How to make a user subscribe to another users using Graph API? - php

I would like to users when added to this website they automatically subscribe to another users in facebook. I know I can list users, which the authenticated user is subscribed to, but can I make a new subscription?
thanks.

Looking at docs,
http://developers.facebook.com/docs/reference/api/user/#subscribedto
Graph api gives only 'read' action for both subscribers and subscribedto
However, you can use the Subscribe Button plugin

Related

Send Facebook invitations only to people who are not registred on my website

For my current project I'm building a Laravel project where each customer will manage his company online. Each customer will invite his users to join his company on the platform, and we will use existing social networks for that, and especially Facebook. But I'm struggling with that invitation system.
Each customers will have to link their business page online with the Fabook Graph API with a page access token I'll stock on database. Like this customers will be able to send invitations through Facebook from our platform.
The problem is that I would let them invite only people who are following them on Facebook and are not on our platform. I saw that it was not possible from the Facebook GRAPH API to get the list of users who liked a Business page. It's only possible from the user to know if he like a specific page if he gave the authorization.
I would like to know how could I reach that goal ? Indeed, I would like to avoid people who are already on our website to be spammed on customers Facebook pages. Would it be a good idea to create a Facebook App linked to our Laravel platform to have more possibilites here on check in system ?

facebook php graph api me/friend reture nothing

hi I'm a facebook api php developer. I developed some apps with me/friend . now this return friends only for my admin account. when another user use this app, it retune nothing.
why this return friends only for my admin account.
if should I get special permission how can I get it.
could you any one please help me.
Make app live
You need to make the app and all its live features available to the general public. This can be done by making the app live by going to https://developers.facebook.com, select Apps --> Your App Name --> 'Status & Review'.
Login Review
You might need to do a Login review.
Review is not required to ask for the three basic permissions: public_profile, user_friends and email. In order to use Facebook Login in your app and access additional elements of a person's Facebook profile, you will need to submit your app for review. If your app is not approved or you don't submit for review, people will not be able to use Facebook Login in your app.
https://developers.facebook.com/docs/facebook-login/review
According to Facebook Graph API for Friends you need user_friends permissions which states that:
Only friends who installed this app are returned in API v2.0 and higher. total_count in summary represents the total number of friends, including those who haven't installed the app.
Friend list now only returns friends who also use your app: The list of friends returned via the /me/friends endpoint is now limited to the list of friends that have authorized your app.
Read change log
You can debug me/friends endpoint as well.

Can we get facebook friend list of a email id without using login with facebook feature

Is there any way to get friend list of a emailid?.
I want to get facebook friend list of a email email id like 'test#gmail.com' without login into facebook with this email id.
Is it possible??
No, you can't. Users are identified by an ID on Facebook, not their email.
Facebook PHP SDK is "just" PHP library that help you to use Facebook Graph API, go read its doc to lear all what you can and can't.

Group add request using facebook graph api?

Are there any built-in "Group add request" actions that come with the facebook graph API? Like the built-in Like action? That happens with a users request. I would like to do this from an external website, just like the Like action works
For example the user is active in a forum, where different categories have their own facebook group page, and they would like to access the group without having to actually log on facebook and make the request.
From the docs:
Invite User
Applications can invite users to a group by issuing a POST request to /GROUP_ID/members/USER_ID with an app access_token.
Note that user being invited must be a user of the application. The user will be sent a notification saying that they have been invited to the group. The notification will take them to the group page. Users can only be invited once. Subsequent invites will fail.
So you the user will have to authorize your app, and then you can do it.

Best practice for custom subscribe action in Facebook app?

I want to implement a facebook app, where I have several authors, which can post updates (text + image - similar to a very simple blog). Actual facebook users can browse the authors inside the app and read their entries.
I now want to create the possibility for facebook users to subscribe to one (or several) authors.
I currently only see two possible solutions:
Store the Facebook ID of the user who wants to subscribe to the feed and send out mass wall updates to every subscribed user, as soon as an author publishes a new entry.
Use the new subscription functionality, provided by Facebook.
To 1.:
This smells like spam.
To 2.:
Seems to be a more sane way, but I can't find any documentation for custom subscription feeds. Is this possible, at all?
Please keep in mind, that it is not sufficient to subscribe to the complete app, since every author should have an own feed.

Categories