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
7
votes
1 answer

Symfony2 + Facebook-SDK 4.0 - How to integrate?

If updated now my symfony project to facebook-sdk-v4. My question is now how to integrate it to use in my controllers? For the old version i had the following line in my autoload.php //Loading facebook from vendor require_once __DIR__ .…
Fabian
  • 1,806
  • 5
  • 25
  • 40
7
votes
1 answer

facebook-php-sdk vs facebook-php-sdk-v4

I am using facebook-php-sdk v 3.0.0. Checked that facebook-php-sdk-v4 have changed totally. I have requirements of Register,Login & Sharing from this API. My question is : Which is more suits for me? Do I require to update version to 4.0.0? 1)…
Niko Jojo
  • 1,204
  • 2
  • 14
  • 31
7
votes
1 answer

How to get a new 'short lived' facebook access token (serverside) with the previously used permissions while not using the api explorer?

Intro I've got a little Facebook fan page I'm posting updates on. To do that I'm using a long lived access token which expires every 60 days with the permissions: 'manage_pages' and 'publish_stream'. Upon researching I've found no "this is it"…
7
votes
1 answer

Facebook API Search - Search for Groups?

I have been testing the Facebook php sdk. I am able to search for pages & places but not groups. According to the documentation, this should return groups... https://graph.facebook.com/search?q=programming&type=group The below code works. If I…
7
votes
2 answers

Post to facebook via cron

I've been trying for two days to post messages gathered from a twitter search to one of my facebook pages automatically - i.e. via a cronjob. The twitter part went fine, but for the life of me i can't get the Facebook part to work. The problem is…
pixeline
  • 17,669
  • 12
  • 84
  • 109
7
votes
2 answers

Share existing facebook post (thus incrementing 'Shares' count of original post

Hei, I have an app in which i'm trying to share existing facebook public content from an account (like a link of a photo) to my wall using Facebook PHP SDK, with a call to 'graph.facebook.com/me/feed' and using the original 'link' attribute of the…
Alex Sayegh
  • 233
  • 4
  • 16
7
votes
4 answers

Cannot access application using the specified access_token

I am using Facebook long time tokens(2 months), but FB starts to be nondeterminic and gives me sometimes this return { "error": { "message": "Cannot access application using the specified access_token", "type": "OAuthException", …
7
votes
1 answer

Facebook PHP SDK - getLoginUrl() - state value

I am using the PHP SDK getLoginUrl() function which works perfectly to log the user in. Once the user is redirected back to my page, the URL can come in two forms, see in the following link subsection 3:…
Aventuris
  • 630
  • 5
  • 21
6
votes
2 answers

JS SDK vs. PHP SDK

From my brief exploration around various websites, it seems that the JS SDK is much more commonly used than the PHP SDK. Even sites that are implemented in PHP use the JS SDK. The PHP reference page has 776 likes, whereas the JS reference page has…
Kar
  • 6,063
  • 7
  • 53
  • 82
6
votes
1 answer

Codeigniter, Facebook javascript SDK, PHP SDK Redirect after facebook login doesn't getUser() until refresh

The process is as follows. 1. User clicks Facebook Login button 2. User signs in and grants perms 3. Facebook redirects uses FB.Event.subscribe auth.login to redirect my login controller 4. My login controller loads the fbconnect module and chains…
6
votes
1 answer

Incorporating facebook login, using facebook php-sdk (v.3.0.0), with sessions and cookies

I am new to PHP, and have had a very difficult time understanding the facebook login system. I have downloaded the three src/ files from github (https://github.com/facebook/php-sdk/). I tried using the example.php file to get me started. However, I…
Marina
  • 3,222
  • 5
  • 25
  • 35
6
votes
7 answers

Facebook Authentication Implementation

I'm working on a project which will use facebook authentication completely (no custom authentication implementation exists). Project uses PHP for server-side scripting. I looked around for implementing fast and secure authentication mechanism but i…
6
votes
3 answers

Facebook API SDK (PHP) clearing site sessions

I am successfully using the Facebook SDK (PHP) to connect users to my site, but I'm having issues when they authenticate their account. Their account is successfully authenticated, but for some reason my site's sessions are cleared. Flow: User logs…
user490152
6
votes
1 answer

Facebook Graph API - Getting facebook group posts

I am trying to get posts from facebook groups using fb graph api ,php sdk. I can get posts from groups am admin but when i try to get posts from where am a member it returns an error Graph returned an error: (#200) Requires either admin permissions…
Nayeem Azad
  • 657
  • 5
  • 20
6
votes
2 answers

How to set Facebook App api level version?

In the facebook developer dashboard when I look at my app I see things like: This app is public and available to all users API Version: 2.4 App ID: ... App secret: ... How do I set API version 2.3 ? The field where 2.4 is displayed is…