facebook-graph-api

OAuthException when trying to upload/post photos to group

三世轮回 提交于 2020-01-03 22:58:46
问题 I am currently trying to upload photos to pages and groups through an app. I have these codes: try { $facebook->setFileUploadSupport(true); $args = array('message' => 'This is my image caption',); $args['image'] = '@'.realpath('./uploads/terragarden1.png'); $response = $facebook->api('/GROUP_ID/photos/','POST',$args); } catch(FacebookApiException $e) { echo "Error: ".$e; } The value of $args['image'] would be something like this: @/home/publica/public_html/AutoPost/uploads/terragarden1.png

OAuthException when trying to upload/post photos to group

烈酒焚心 提交于 2020-01-03 22:58:23
问题 I am currently trying to upload photos to pages and groups through an app. I have these codes: try { $facebook->setFileUploadSupport(true); $args = array('message' => 'This is my image caption',); $args['image'] = '@'.realpath('./uploads/terragarden1.png'); $response = $facebook->api('/GROUP_ID/photos/','POST',$args); } catch(FacebookApiException $e) { echo "Error: ".$e; } The value of $args['image'] would be something like this: @/home/publica/public_html/AutoPost/uploads/terragarden1.png

Graph Search API order by like fql

醉酒当歌 提交于 2020-01-03 18:50:46
问题 Is there a way to sort the result with the Graph api by key? and choose desc or asc? just like in fql? in the FQL I perform my query for event with ORDER BY start_time ASC at the end anything similar in the graph api? 回答1: There's currently no way to sort the results of Graph API calls, see https://developers.facebook.com/docs/graph-api/using-graph-api/v2.1#reading In the most cases, the results are returned in the order of the creation time though. 回答2: Currently in version 2.10 I can say

In the FB marketing api, there is an option to export_format: 'csv', how do I download the csv file?

末鹿安然 提交于 2020-01-03 18:43:12
问题 I'm looking to download a CSV from my api call to FB ads, I've set it in the parameters as per the code below, the call works fine but I only get a paginated JSON as a response. I'm not quite sure how to access the CSV report, the response doenst give me any report ID or download link. How can I download this CSV? Using nodejs facebook-nodejs-ads-sdk image showing the parameter information 'export_format' Documentation: https://developers.facebook.com/docs/marketing-api/reference/adgroup

Cannot delete application invite in Facebook after acceptance

前提是你 提交于 2020-01-03 17:08:12
问题 I've looked through this site and looked at the Facebook docs but I can't seem to delete an invite after a friend accepts. So, what happens is: 1. Steve invites John to a game. 2. John receives that invite and clicks accept. 3. John is taken to the game, but the invite message is not delete in his facebook page. Facebook docs suggests I add "method=delete" when I post to https://graph.facebook.com/[request_id]?access_token=xxxx But that returns me "{"error":{"type":"OAuthException","message":

Cannot delete application invite in Facebook after acceptance

流过昼夜 提交于 2020-01-03 17:07:13
问题 I've looked through this site and looked at the Facebook docs but I can't seem to delete an invite after a friend accepts. So, what happens is: 1. Steve invites John to a game. 2. John receives that invite and clicks accept. 3. John is taken to the game, but the invite message is not delete in his facebook page. Facebook docs suggests I add "method=delete" when I post to https://graph.facebook.com/[request_id]?access_token=xxxx But that returns me "{"error":{"type":"OAuthException","message":

What does it mean “error_subcode”: 33 in the facebook response error?

倾然丶 夕夏残阳落幕 提交于 2020-01-03 16:41:51
问题 Does anybody know what does it mean error_subcode : 33 in the facebook response error? I know it's related to a mission permission but I want to be 100% sure. We received the following error: {"error":{"message":"Unsupported get request. Object with ID 'XXXX' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api","type":"GraphMethodException","code":100,"error

How to set Facebook album privacy with Graph API?

血红的双手。 提交于 2020-01-03 15:59:12
问题 I would like to know if it's possible to set the privacy setting for a specific Facebook album with RestFB Java library ? Thank you very much, Regards, Anthony 回答1: You can set privacy settings when the album is created. Currently, you can not update the settings, nor can you delete an existing album via API, in case you wanted to just delete and recreate it as a work around. http://bugs.developers.facebook.net/show_bug.cgi?id=17111 When you create the album, you need to create a privacy

Unable to get the email id of the User when Log-in with Facebook SDK in iOS

丶灬走出姿态 提交于 2020-01-03 15:31:23
问题 I am getting [null] value when I am fetching the user's email-id using below code. Also, I already set the permission to access the email like this. { self.fbLoginButton.readPermissions = @[@"public_profile", @"email", @"user_friends"]; } Also Fetching the email details in delegate. - (void)loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult: (FBSDKLoginManagerLoginResult *)result error: (NSError *)error { if ([FBSDKAccessToken currentAccessToken]) { [[[FBSDKGraphRequest alloc]

android opening facebook app on a specific post

笑着哭i 提交于 2020-01-03 11:01:14
问题 I am working on an application that fetches posts from user stream (from stream table) and displays them. streams post_id fields are returned in the format of: {uid}_{postid}, e.g.: 100001147753406_320951738012113 How can I open facebook application to show such post? in web browser this can be done with the url: www.facebook.com/uid/posts/postid, and according to searches this should be accomplished by setting Intent's uri to: fb://post/{postid}?owner={uid} However, this does not always work