I am little bit confused about new api and app review steps of facebook api. I need to have facebook login and get the list of friends of a logged in user and sent invitation to use app for selected friends. What are the steps i should follow it? do i need to submit my app for review in facebook?
You can´t get all the friends of a user anymore, at least not for an Android App. You only get the friends who authorized the App too.
There is invitable_friends for inviting friends, but:
The Invitable Friends API is only available to apps classified as Games, which also have a Canvas presence. This API is not available in v1.0. It may be called by mobile games as long as they also have a Canvas presence.
You may want to read this too: https://developers.facebook.com/docs/apps/faq#invite_to_app
Facebook change there api police. if you do not get Friends to send invitation. if you want to do that then you need to submit your app for review by facebook team but if your app is Game then you able to do that.
But another way, you can do that, You can do it via facebook web-dialog to send invitation.
Thanks
Related
I'm a student doing university project in which we are developing an app that has the use case to combine social media feeds of the users. For this i need access to facebook graph api "user_post"
I have already made an app on facebook developer portal and i have written code for facebook login inside my android app but now i want to work on user feed but when i went to request permission section, they are asking for app review, business verification etc. Now problem is that how can i submit my app for review when i have not access to api in order to develop and test it.
I'm searching ways for 2-3 weeks but all solutions are not working as facebook has updated alot of things. I will be very thankful if someone will be able to help me with this facebook api access as i'm new to it.
You can always test it with your account, that is admin, developer or tester in the App. user_posts will work with that account without review.
I am developing an Android App and using Facebook Login to let user sign up using their Facebook Accounts.
I am a beginner, so wanted to know how to keep track of user's friends signing up on my application and accordingly push notify both users. I am adding a timeline, so I want to show user posts from his social circle only.
Resolution: We are now considering using Invite Friends in latest version of Facebook Graph API.
Facebook did an update a while back , I dont recall which version of the SDK or Graph API (Graph API 2.0 maybe?) this took effect in but you really cant do that kind of thing anymore. Now when you request the list of friends for the user the user ID for the friend that is returned in that list is now randomly generated and not their real account ID.
So when a friend that was pulled in from another user attempts to login with your app the ID you get for them is entirely different. The only real way to do this would be to then name match really but that is entirely unreliable in most cases.
EDIT
This only behaves this way for games or for using the tagging api. Not for general friends list request.
Is it possible to start an intent from my android app to select a friend from Facebook messenger and get the conversation history with him? If yes how such intent should look like? Or do I have to use Facebook SDK for that?
This is not possible for several reasons:
First of all, you would need to select friends by using /me/friends, but you don´t get a list of ALL friends. Since v2.0 of the Graph API, you only get friends who authorized your App too.
You would need to get the read_mailbox permission approved by Facebook. But that permission will not get approved for Android Apps.
If that would be possible, an App would be able to get access to the messages of the friends of the authorized user. Which would obviously be a pretty heavy privacy issue. Just so you understand what this is not possible at all.
I try using this link this. In this tutorial i post my app link only my wall. But i want to share my app link to all my friends. Same like as a XYZ invited to you to try ABCapp only in notification bar. When click on it open google play store of my app page. I want to share my app app link to app facebook friends or selected facebook friend. How can i achieve this?
To invite friends through your app you can use App Invites. Before using this feature make sure to set up your Android Facebook SDK version to 4.0 or later.
You can take a look at the overview in this link
https://developers.facebook.com/docs/app-invites/overview
For the implementation you probably need this
https://developers.facebook.com/docs/app-invites/android
https://developers.facebook.com/docs/apps/faq#invite_to_app
If your app has a Canvas presence, you may also use the Requests Dialog on iOS and Android
If your app does not have a presence on Facebook Canvas: You may use the Message Dialog on iOS and Android, or the Send Dialog on Web
I assume you don´t have a Canvas presence? In that case you should not use App Requests.
Basically what you need is the list of all the friends of user on facebook to invite them. you can get ALL friends' list only if your app is in "GAME" category.
If not, then you can still get the friend list of user , but only some, not all. refer to terms friends and invitable_friends on facebook.
So, here are few things you can do (BUT NOT RECOMMENDED AT ALL)
Change the category of your app to "GAMES" & you'll be able to get
all friend's list & then you can use WebDialog & WebDialog.RequestsDialogBuilder to invite that friends
give any link to canvas URL on facebook app setting. that link will be used only when user clicks your notification from web. that link won't affect your app in any way.
I have seen some android apps around that are able to invite friends to the app and detect when these friends have accepted the request.
I have been reading a bunch of documentation there at facebook and I can see I just need to create a request dialog to let the current signed user invite people. The problem comes when I want to know if this invited people have accepted the invitation and have installed the app.
First of all, It seems that I can just use the invite api if I have a canvas application beside the android one (At least this is what the docs state when using new 2.0 api -> "The invitable_friends API is only available for games that have a Facebook Canvas app implementation using version 2.0 of the Graph API."). Does this need to be in production too? Or I can just leave the canvas application as a placeholder there at facebook developer portal and just use the android one.
Second, How am I supposed to query the information I need (check if the friend the user invited has accepted + installed my app)?
The solution is a bit more complex that what it seems. Here is an approach you can take to get this working:
From inside your game, you can invite non-player friends by querying the Invitable Friends graph api call newly introduced in 2.0, and then creating a multi friend selector to invite those friends.
Suppose a player accepts that request, and enters your game. Their URL will contain extra information (won't be just app.facebook.com/yourgame), so you have to use Deep Linking to parse that extra information, and know that the user came because YOU invited him (you can send data in the request to help you do this). After you do this, a server is needed with a backend to record that your friend accepted your request and is playing.
Now, in the sender account, you need to query the server to see if any friend of yours accepted, and then give the appropriate message/reward.
Hope this clears up how to achieve this!