Questions tagged [facebook-php-sdk]

The Facebook PHP-SDK provides Facebook Platform support to your PHP - based web apps.

This library helps you add Facebook Login and Graph API support (targeted posting, ad management, photo upload etc.) to your Website.

Documentation facebook-php-sdk

3679 questions
8
votes
4 answers

Delete facebook post with Graph API - trouble getting this to work

I'm using the following to post a message on my Facebook page: $attachment = array( 'access_token' => $access_token, 'message' => 'This is a test Message 4:', 'name' => "This is a test Name 4", 'link' => "http://slashdot.org/", …
a coder
  • 7,530
  • 20
  • 84
  • 131
8
votes
2 answers

Facebook Graph API to get public post of the public page

I want to access the public post of the public page in php script. Is there any feasibility to get this data from facebook pages. I have checked the documentation and found out as below…
Yogendrasinh
  • 895
  • 1
  • 8
  • 23
8
votes
3 answers

Facebook New PHP SDK For Graph API - Multi Query

I'm at my wits end in what the queries parameter value should look like. So to sumbit a multiquery accross the graph API library, the following would be the code method to perform it, as far as I can tell. $param = array( 'method' =>…
Rob K.
  • 519
  • 6
  • 16
8
votes
3 answers

Facebook Ads Sdk doesn't allow to post ad via API. Subcode: 1487930

I've read a lot about facebook ads and stuff, using GUI it allow to do what I'm doing and for some reason on sdk it doesn't. I get this suberror code on Facebook ads sdk subcode 1487930. The message says: You Must Select an Object to Promote, the…
8
votes
4 answers

Get page access token with Facebook API 5.0 PHP

I need to post messages on a Facebook page. Specifically I want to post via cron. Here's what the API docs say: Page Access Token – These access tokens are similar to user access tokens, except that they provide permission to APIs that read, write…
S. Délas
  • 91
  • 1
  • 1
  • 3
8
votes
2 answers

Post on a Facebook Group using 2.0+ API, PHP SDK

Even after having read Facebook Developer's FAQ I've many questions about the development of FB apps, permissions, reviews and so on. I created my app because I wanted to use FB Login and FB id's to manage users of my (small) site; the site purpose…
Hunter
  • 310
  • 1
  • 5
  • 15
8
votes
2 answers

Facebook oAuth: Force email permission

How do sites like StackOverflow and Untappd "force" a user to accept their permissions? When I've been trying with the JavaScript SDK I've been using the scope object to request email addresses, but I keep seeing "Edit the info you provide",…
Lee Davies
  • 313
  • 1
  • 5
  • 9
8
votes
2 answers

How to send direct message from Page with Attachment via Facebook Graph API?

I can manage Page Conversations (read, write) in help with Facebook Graph API. But it seems to be impossible to add any attachments to my direct messages. https://developers.facebook.com/docs/graph-api/reference/conversation/messages I see only…
8
votes
3 answers

oAuth exception #200 while trying to post to groups after recent Facebook maintenance

"message":"OAuthException: (#200) Insufficient permission to post to target on behalf of the viewer","trace":"[]","code":0 This message started to appear randomly after the recent Facebook maintenance actions. My users are generating this error…
Oleg Belousov
  • 9,981
  • 14
  • 72
  • 127
8
votes
3 answers

how to refresh facebook access token for server side (in facebook-php SDK)?

I'm using the Facebook PHP SDK to call relevant APIs to post and get data. At present I'm saving a user access token in the database but it expires after 60 days. How can I refresh a user access token? 1 . When do I need to refresh the access…
8
votes
2 answers

Not getting email from facebook API while login

I have a problem while login i can't get email even while adding email to User & Friend Permissions (for some facebook accounts). i'm using facebook-php-sdk, this the code that im using $facebook_user_profile = $facebook->api('/me', array('fields'…
Haithem Rihane
  • 394
  • 2
  • 5
  • 15
8
votes
3 answers

Best way to implement Facebook PHP SDK into Yii Framework

I have put the Facebook SDK files into the protected/helpers directory, from which I autoload classes and 3rd Party helpers for my Yii Application. When one of my projects involved Facebook Login, I've came up with this simple and quick solution,…
user1386320
8
votes
4 answers

Cookies not setting in Safari 6

Good evening, I've asked this question a couple of times without responses, hope this time goes well. I've been developing facebook apps for a couple of years now, using php and the Facebook PHP SDK. Lately I've been struggling with Safari and the…
chuysbz
  • 1,262
  • 6
  • 18
  • 47
8
votes
5 answers

"An active access token must be used" (Dec 2012) && The proper way to set up Facebooks PHP-SDK for Ajax calls to get the user-id

This is giving me quite some headache. I have an page-tab-application, where DB-interaction uses the facebook-user-id to assign and save data and also to check user permissions. Until a weak ago everything was working fine, but now with the upcoming…
hugo der hungrige
  • 12,382
  • 9
  • 57
  • 84
8
votes
4 answers

Facebook PHP SDK - getUser() suddenly returns 0

First of all, to get this out of the way, I've spent hours looking through answers to this question here on StackOverflow, and tried to solve it on my own, but it just isn't working (anymore). So anyway... Yesterday, everything worked fine. Went to…
GTCrais
  • 2,039
  • 2
  • 26
  • 32