Saturday, July 23, 2016

Unable to get taggable_friends in fb graph api

Leave a Comment

I am trying to get my friends list, whom I can tag from my app I am building.

here is the url me/taggable_friends

Here is the error

{   "error": {     "message": "(#10) To use taggable_friends on behalf of people who are not admins, developers and testers of your app, your use of this endpoint must be reviewed and approved by Facebook. To submit this feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review",     "type": "OAuthException",     "code": 10,     "fbtrace_id": "BZ6EPL0H8BV"   } } 

I have given user_friends permission and I have added testers for my app. I am not sure what more to add? Some one please guide me

Edit: Here is the screenshot which do not display my entire access token enter image description here

1 Answers

Answers 1

You need to change application dropdown at the top-right corner of the graph API explorer. Remember, you cannot test /me/taggable_friends if the dropdown is selected as "Graph Api Explorer". you need to select your own registered application in the dropdown list. (Don't worry. you don't need to write any code right now. you can start building your application after you finish testing. BUT you need a registered application id. It will take only 30 seconds, if you don't have any application listed here .)

Go to My Apps -> Add a new app -> enter details like name,email and category -> submit. Now you have an registered application.

Now head over to Graph Api Explorer, and select your newly created application from drop-down menu. Get user access token with user_friends permission selected. and finally submit GET request to /me/taggable_friends. You will see list of your friends whom you can tag.

enter image description here

Now the JSON response has all data that you can receive using this node. You can further narrow it down by using fields. Eg: /me/taggable_friends?fields=first_name. To see all available fields etc., please read documentation here and here.

Also see the id values in the response. This is not original user id. These are called App-scoped User IDs. Another interesting field is is_silhouette. "is_silhouette": false, means the user has uploaded a profile picture. otherwise, "is_silhouette": truemeans the user has default profile picture. (default FB profile picture, silhouette of a male or female)

Hope this helps.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment