facebook-php-sdk

Facebook Marketing API Rate Limit

倖福魔咒の 提交于 2019-12-05 08:05:13
I know that fb have made available some documentation about the requests limits to the api https://developers.facebook.com/docs/marketing-api/api-rate-limiting , but it is not clear how each api call is calculated... i.e, If I want to get stats for ~10,000 adsets, how can I evenly space the time between the calls ? Nithya Sivakumar The best answer i could find for this question from another SO thread - "After some testing and discussion with the Facebook platform team, there is no official limit I'm aware of or can find in the documentation. However, I've found 600 calls per 600 seconds, per

The Access Token is Valid but We get OAuthException: An active access token error

落花浮王杯 提交于 2019-12-05 03:15:40
问题 We've been working on an application for about 2 months, and everything was going perfectly. we were using PHP SDK and offline mode in permissions for login But since some days ago after recent changes in Facebook api and removing offline mode we started facing the problem of "Uncaught OAuthException: An active access token must be used to query information about the current user." The main problem is that it does happen after a while working in our app (about 10 mins) but at the same time

Reading data from Facebook graphObject

本秂侑毒 提交于 2019-12-05 02:14:20
A user has accepted my Facebook app. I can now access some of their data. It is returned as a graphObject , which contains something like: Facebook\GraphObject Object ( [backingData:protected] => Array ( [id] => 11111 [first_name] => Bob [gender] => male [last_name] => Builder [link] => https://www.facebook.com/app_scoped_user_id/11111/ [locale] => de_DE [name] => Bob Builder [timezone] => 2 [updated_time] => 2014-02-14T14:35:54+0000 [verified] => 1 ) ) Unfortunately I cannot get at the data inside this object. Reading it like an array throws an error: $fbid = $graphObject['id']; // Cannot use

Symfony3 Facebook Login - redirect_uri URL gets converted to relative

痞子三分冷 提交于 2019-12-05 02:01:43
问题 I am trying to implement facebook login for a web-app. Here is the FacebookConnect.php <?php namespace Vendor\GiftBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Generator\UrlGenerator; class FacebookConnectController

Facebook Graph API v3.1 Access Token Permission Limitations For Developers

微笑、不失礼 提交于 2019-12-05 01:13:19
问题 As you know that Facebook upgraded it API to V3.1 and now killing old APIs and Apps slowly so we have to migrate on there new API where they took some hard decision that is good on SPAM site but hard for developers too. Reminder: Graph API v2.7 will be deprecated on Oct 05, 2018. Please use the API Upgrade Tool to understand how this might impact your app. For more details see the changelog Now I created a new FB app with some settings as shown in the below screenshots to Post On My Own Pages

How to publish Actions to Facebook Graph API with parameters in call URL

≡放荡痞女 提交于 2019-12-04 21:58:09
To begin, Ive spent several hours looking for an answer and have come CLOSE but havent found a full answer. So Im trying to publish actions using Facebook's Graph API and want to send parameters in the URL when initially calling it with the Facebook Javascript SDK. Here is a call that WORKS: function postNewAction() { passString = '&object=http://mysite.com/appnamespace/object.php'; FB.api('/me/APP_NAMESPACE:ACTION' + passString,'post', function(response) { if (!response || response.error) { alert(response.error.message); } else { alert('Post was successful! Action ID: ' + response.id); } } );

post a feed on my facebook application fan page

北城以北 提交于 2019-12-04 19:43:26
I know how to post something on my wall $facebook->api('/me/feed/', 'post', $feed); but how to post feed on my facebook application page and this feed must be posted by the app Here you go: // we need to get an application access_token first $token_url = "https://graph.facebook.com/oauth/access_token?" . "client_id=" . $app_id . "&client_secret=" . $app_secret . "&grant_type=client_credentials"; $app_token = file_get_contents($token_url); // seperate the string returned to use it in the post array $arr = explode("=",$app_token); $app_token = $arr[1]; $post_id = $facebook->api("/$app_id/feed",

Extending valid/expired 60 days access token without user interaction

烈酒焚心 提交于 2019-12-04 17:59:10
I use access token in my joomla module to get page/group wall feed posts to show in user website page.user generated access token by my facebook application from my site before using the module in their joomla site. What i want - "I want to extend the expire date of an existing non-expired/expired 60 days token without user interaction". What i got from web that calling this url token can be extended - https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=fb_exchange_token&fb_exchange_token=EXISTING_ACCESS_TOKEN some test i did to extend token and

Facebook API works fine for /feed, but not for /photos

大兔子大兔子 提交于 2019-12-04 17:36:07
Following is the code that works fine if I am passing /pageid/feed to facebook->api , but when I change it to upload the image directly to my Facebook photo album, it will not work. Kindly let me know what I am doing wrong in the following code: // Works fine $status = $facebook->api("/194458563914948/feed", 'post', $attachment); // Does not work $status = $facebook->api("/196878530339618/photos", 'post', $attachment); Full Source <?php require 'src/facebook.php'; $app_id = "332267477347"; $app_secret = "xxxx"; $facebook = new Facebook(array( 'appId' => $app_id, 'secret' => $app_secret,

Facebook PHP SDK $uid = $facebook->getUser() always returns 0 [duplicate]

三世轮回 提交于 2019-12-04 17:14:55
This question already has answers here : Why is Facebook PHP SDK getUser always returning 0? (26 answers) Closed 5 years ago . I am trying to integrate our DB with the facebook API , really new on this so I would appreciate some help. I am always getting 0 Using $uid = $facebook->getUser() I had a look to similar issues but didn't find a related solution. PHP if($_REQUEST['action']=="signup" && $_REQUEST['auth']=="facebook" && !empty ($_REQUEST['auth']) && !empty ($_REQUEST['action']) ) { require_once('libs/facebook/src/facebook.php'); $config = array(); $config['appId'] = 'xxxx'; $config[