facebook-graph-api

In Facebook Graph API, what are the API calls to get a user's email address

妖精的绣舞 提交于 2020-01-04 05:56:14
问题 Here I'm simply sending a GET request through a rest client.It returns only user id and name .Additionally, how do I retrieve user's email using only a GET request? https://graph.facebook.com/me?access_token= [User's access token] 回答1: https://graph.facebook.com/me?fields=name,email&access_token=[User's access token] It´s called "Declarative Fields" and came with v2.4 of the Graph API: https://developers.facebook.com/docs/apps/changelog#v2_4 API Explorer test: https://developers.facebook.com

Querying Open Graph objects and actions

本秂侑毒 提交于 2020-01-04 05:40:05
问题 I've created a few actions and object types for my application. For this question's purpose, let's assume I have an myapp:book custom type (where myapp is my application's namespace and book is the custom type) and a myapp:read action. Is is possible answer any of the following queries using Facebook's Graph API (or any other FB API)? List all objects of type myapp:book . By that, I mean retrieve a list all pages that FB's scraper has stored which have an go:type of myapp:book . List all

AWS Cognito credentialsProvider.login always shows NIL (SWIFT)

感情迁移 提交于 2020-01-04 05:33:23
问题 I'm trying to implement Facebook Login with AWS Cognito. After receiving the access token from Facebook, I'm not able to update the credentials provider. let token = FBSDKAccessToken.currentAccessToken().tokenString credentialsProvider.logins = [AWSCognitoLoginProviderKey.Facebook.rawValue: token] After this, if I print [AWSCognitoLoginProviderKey.Facebook.rawValue: token] I get the long string but if I print credentialsProvider.logins I get NIL . As a result, my identity pool always shows

FB.UI Feed Dialog - cannot “share” a facebook's picture

十年热恋 提交于 2020-01-04 04:35:12
问题 Sharing facebook photo (really a facebook photo) using mobile web app & Feed Dialog. The problem: Cannot send facebook's photo to the Feed Dialog. All code works great. I get all properties as they sent to the function. FB.ui method: "feed" link: 'url' app_id: myAppID name: 'photo's name' description: '' caption: $('#albumName').text() picture: 'http://myUrl.com/logo.png' , (response) -> if response and response.post_id console.log 'Photo was shared' else console.log 'Photo was not shared.

Messenger persistent menu not visible

ⅰ亾dé卋堺 提交于 2020-01-04 03:38:21
问题 I'm currently developing a Facebook messenger bot. However, I can't attach a persistent menu to it. I read the requirements here: The user must be on Messenger v106 or above on iOS or Android. The page the bot is attached to must be published. The bot must be set to "public" in the developer console. The bot must have passed the approval process for pages_messaging permission And all those are met. When I set the menu, I receive this feedback from Facebook: Array ( [result] => success )

Retrieve user's friends who like the same fan page

点点圈 提交于 2020-01-04 02:51:08
问题 I try to find facebook api to retrieve user's friends who like the same fan page but I dont think the new graph api able to do this. While searching in the stackoverflow, I came out with this FQL: select user_id from like where object_id = "[page_id]" and user_id in (select uid2 from friend where uid1 = me()) but facebook return me with array(0) { } is there any solution ? 回答1: You can do this with FQL: SELECT uid FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND page

Search from Facebook API

孤者浪人 提交于 2020-01-04 02:34:10
问题 I implemented the post search from Facebook api V2.0 on a test server which is still working fine. But when shifted the code to client server and registered a new app for that url. It gives the result stdClass Object ( [error] => stdClass Object ( [message] => (#11) Post search has been deprecated [type] => OAuthException [code] => 11 ) ) On previous app of test it is still working. If the post search is deprecated then it should not work on both. I'm not getting if i'm missing some settings

Read Messages in Facebook

a 夏天 提交于 2020-01-04 02:32:06
问题 I have been trying to read the messages from a particular user (friend). I couldn’t find a proper documentation in graph API regarding querying messages or threads in Facebook messages. Can anyone please help me? 回答1: You can only read messages for the user using your app, not for his friends. (And that’s a good thing …) For doing it for the current user, see here: https://developers.facebook.com/docs/reference/api/user/ (inbox & outbox connections) 回答2: It's currently hard to do it because

Python: Facebook Graph API - pagination request using facebook-sdk

冷暖自知 提交于 2020-01-04 02:16:12
问题 I'm trying to query Facebook for different information, for example - friends list. And it works fine, but of course it only gives limited number of results. How do I access the next batch of results? import facebook import json ACCESS_TOKEN = '' def pp(o): with open('facebook.txt', 'a') as f: json.dump(o, f, indent=4) g = facebook.GraphAPI(ACCESS_TOKEN) pp(g.get_connections('me', 'friends')) The result JSON does give me paging-cursors-before and after values - but where do I put it? 回答1: I'm

In Android how to add user_photos permission to get the facebook album photos?

瘦欲@ 提交于 2020-01-04 01:49:10
问题 I am using the facebook android sdk to access the user's facebook albums and intern get the photos. But when I do a "https://graph.facebook.com/"+wallAlbumID+"/photos?access_token="+facebook.getAccessToken() it returns blank data. { "data": [] } I read in stackoverflow question and also in Graph API for Photo that I need to give user_photos permission while creating the facebook object. I am not sure how to do so.I read a lot of forums and also checked on SOF but could not find the solution.