facebook-graph-api

how can i get user information using facebook sdk 4.1 in ios?

主宰稳场 提交于 2020-01-15 06:43:27
问题 I'm using a pre-built login UIButton of Version 2.3 of facebook integration. Problem: Getting null result, when fetching user details. -(void) loginButton:(FBSDKLoginButton *)loginButton didCompleteWithResult:(FBSDKLoginManagerLoginResult *)result error:(NSError *)error { if ([FBSDKAccessToken currentAccessToken]) { FBSDKGraphRequest *request =[[FBSDKGraphRequest alloc]initWithGraphPath:@"me" parameters:nil]; [request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id

Facebook Ads API Invalid OAuth access token

北慕城南 提交于 2020-01-15 04:59:26
问题 We are currently trying to setup an Ads API in Laravel. It has been days but the getAdAccounts() call always results in 'Invalid OAuth access token.' exception. However same access token when used in the Graph Explorer API works just as well for the adaccounts endpoint Here is the code - try { $fb = new Facebook([ env('FACEBOOK_APP_ID'), // App ID env('FACEBOOK_APP_SECRET'), env('FACEBOOK_GRAPH_VERSION') ]); $helper = $fb->getRedirectLoginHelper(); $accessToken = $helper->getAccessToken(); if

facebook long term token “(#200) User must have accepted TOS”

江枫思渺然 提交于 2020-01-15 04:58:09
问题 From what I've seen no one as given a good answer to this question about using a long term token to publish contents in a Facebook page. So, I've checked: My user as permissions to post to that page My APP as requested enough permissions to publish to the page I've used the page temporary token to request the long term token to publish to the page I've got the page temporary token with this GET: var obj; FB.api("/me/accounts", function (response) { if (response && !response.error) { obj =

passing timespan to facebook open graph

。_饼干妹妹 提交于 2020-01-15 03:36:26
问题 How can I specify the time for my action to be presented in present or past? I've tried - $facebook -> api('/me/myapp:read', 'POST', array('expires_in' => '180', 'start_time' => date('c'), 'access_token' => $this -> session -> userdata('ftoken'), 'object' => base_url() . $data['link'])); but that doesn't work - so what am I not getting? Explanation :read is actually just the action in my facebook app. The post is happening and the "read" action is getting logged, the problem is that it is

passing timespan to facebook open graph

↘锁芯ラ 提交于 2020-01-15 03:36:06
问题 How can I specify the time for my action to be presented in present or past? I've tried - $facebook -> api('/me/myapp:read', 'POST', array('expires_in' => '180', 'start_time' => date('c'), 'access_token' => $this -> session -> userdata('ftoken'), 'object' => base_url() . $data['link'])); but that doesn't work - so what am I not getting? Explanation :read is actually just the action in my facebook app. The post is happening and the "read" action is getting logged, the problem is that it is

Satellizer Facebook login not returning the right scope

爱⌒轻易说出口 提交于 2020-01-14 13:57:06
问题 I'm using Satellizer to do a Facebook login, it works great except that Facebook is not returning all the users info. I'm only getting a name and ID but no email when I inculde in my scope email and public_profile. Here is my FB config on the client side, and as you can see, I'm asking for email and public_profile: facebook: { clientId: 'xxxxxxx', url: '/api/public/authentication/facebook', authorizationEndpoint: 'https://www.facebook.com/v2.3/dialog/oauth', redirectUri: window.location

Creating facebook events with api v2

醉酒当歌 提交于 2020-01-14 09:55:47
问题 Is possible to creating events with Facebook API? It is possible in API v1: https://developers.facebook.com/docs/graph-api/reference/v1.0/event#publish But not in v2 (the current version): https://developers.facebook.com/docs/graph-api/reference/v2.0/event#publish Can I use v1? is there some other way to creating Facebook events in a PHP app? 回答1: If you have an app that was created before 4/30/14 you can use v1. But at 4/30/15 v1 will be deprecated and you will have to use v2. 回答2: According

How to trace the cause of a 500 internal server error?

送分小仙女□ 提交于 2020-01-14 09:43:34
问题 I'm trying to do the following using FB's official PHP SDK: $facebook->api( '/me/feed', 'POST', array( 'link' => 'test', 'message' => 'test' ) ) Unfortunately, the server (not facebook!) returns a 500 error. The request goes through, the status gets posted, but my server returns an error. My question is, how do I find out what's the cause of it? 回答1: 500 is generally "internal server error". If you get 500 back from your facebook api call, then it might be something wrong on their end. Then

Facebook graph API response size limiting (error code 1)

与世无争的帅哥 提交于 2020-01-14 08:59:29
问题 Just sharing some information I came across while testing my application. Facebook Graph API implements rate limiting as described on their documentation page. Today I was trying to retrieve the feed from CNN facebook page and I got the following 500 error: {"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}} This is the query I was trying to test: https://graph.facebook.com/v2.3/5550296508/feed?fields=id,actions,application,caption

Facebook graph API response size limiting (error code 1)

邮差的信 提交于 2020-01-14 08:59:09
问题 Just sharing some information I came across while testing my application. Facebook Graph API implements rate limiting as described on their documentation page. Today I was trying to retrieve the feed from CNN facebook page and I got the following 500 error: {"error":{"code":1,"message":"Please reduce the amount of data you're asking for, then retry your request"}} This is the query I was trying to test: https://graph.facebook.com/v2.3/5550296508/feed?fields=id,actions,application,caption