All Questions
Tagged with facebook-access-token facebook-php-sdk
90 questions
0
votes
1
answer
434
views
Can't get the access token in facebook sdk 5 login using php?
I hosted my files in heroku hosting. Facebook login callback file throws both the exceptions.
First exception
Response Exception: Can't Load URL: The domain of this URL isn't
included in the app'...
1
vote
1
answer
588
views
Facebook API post in group through linked Facebook page
I am facing an issue, using Facebook api, i am able to post in a group using User Access Token and as a user. But i want to post in a group as a Page, i have linked page with that group. But it seems ...
0
votes
0
answers
18
views
Facebook access token call returning null response [duplicate]
EDIT
Please note, my issue is with regard to the url not returning any data at all....not about the API version as mentioned and answered in the 'duplicate' question' and as occurs later in my code. ...
0
votes
1
answer
108
views
Tip needed: How to check if API request comes from my app (using Facebook Tokens)?
I'm currently building an app and an API for that app to communicate with.
My API gathers information from the Facebook Graph API, processes/enrichs them with some data in my database and returns them ...
4
votes
1
answer
21k
views
Get Access Token Without Login | Facebook`
I am creating a web app and I need to make a call like this one:
https://graph.facebook.com/639339682906611?access_token={my_access_token_here}
When I obtain an access_token through the Graph API ...
-1
votes
1
answer
105
views
facebook api open graph
I wanted to display the share count of the articles on my blog (wordpress) to the readers. So I decided to call the api directly:
$fb_call = "https://graph.facebook.com/fql?q=SELECT%20share_count,%...
0
votes
1
answer
103
views
Obtaining Facebook Page Access Tokens Without Page Ownership
Is it possible to generate a page access token for a page that I didn't create?
I have been granted an 'Admin' page role but annoyingly when I go to the Graph API Explorer ( https://developers....
0
votes
2
answers
493
views
How to get user access token though server-side authentication
How can I get user access token though server-side authentication Facebook sdk. I have faced this error:
Catchable fatal error: Argument 1 passed to Facebook\Helpers\FacebookRedirectLoginHelper::...
0
votes
1
answer
445
views
Facebook Javascript API "This authorization code has been used" on quick screen refresh (F5 or COMMAND+R)
I'm using the Facebook Javascript API for login in conjunction with the official Facebook PHP SDK on my server to execute the two following lines of code:
$helper = $fb->getJavaScriptHelper();
$...
0
votes
1
answer
374
views
How do i get app_data on a Facebook page tab using php sdk 5
I try to pass variable like this https://www.facebook.com/testapp/app/appnumber/?app_data=522 in a page tab/app/game and then retrieving the value, using php sdk5 graph api 2.5, is there any solution ...
1
vote
1
answer
2k
views
Integrating Laravel, Facebook and Angular with token-based-authentication
My use case:
User is already logged in automatically server side using Facebook with laravel and Socialite.
I check if the user exists in the db and if not create it and log them into laravel.
Then ...
1
vote
1
answer
1k
views
Facebook PHP SDK Long-lived access token expires after refresh site
I'm using Facebook SDK v5 for PHP and I'm trying to get long-lived USER access token.
I'm getting it, makes long-lived once and save to my database, then I go to another page where I use it to get ...
13
votes
23
answers
37k
views
Facebook PHP SDK 5 :: API 2.4 :: Cross-site request forgery validation failed. Required param "state" missing
I did a very simple PHP script, just to try to login via Facebook and get an accessToken. But when I try the following code, I get an Exception from the SDK : « Cross-site request forgery validation ...
2
votes
0
answers
923
views
Facebook canvas app authorization works only in main page
I have a Facebook canvas app.
I need an access token, the user authorizes the app and the apps main page works fine, but not the other pages.
When I click one link in my app that redirects to ...
1
vote
1
answer
164
views
Do Facebook provide the access token (at that instant) or one can get only after the friend's permission? (Using PHP Facebook-graph-API )
I am using PHP for accessing Facebook friends location. I want to access location of all friends. I read that it requires "access tokens" to get client's public information from here
https://...
2
votes
1
answer
3k
views
Extending 60 days Facebook token
I'm using Hybridauth to connect with Facebook. Everything works well at that point ;-)
I get a token and when I check it at https://developers.facebook.com/tools/debug/ I see it has 2 months ...
0
votes
1
answer
179
views
Facebook token invalid but can access api
I have a token from facebook (from the graph explorer tool). I am using the PHP sdk. I created a session using the said token and called the FacebookSession::validate() method. It returned TRUE. I ...
1
vote
1
answer
729
views
App post notification to user. How do I get an access token for app?
I am using the new version 2, sdk 4.0 php. I am trying to send a notification to a user with my app. I just realised the access token that I get via login (user access token) is different to the ...
2
votes
1
answer
308
views
Getting warning while creating a page access token with 'manage_pages' permission
When I try to get a page_access token with 'manage_pages' permission, i get following warning
The following permissions have not been approved for use: manage_pages. If you make your app public, ...
3
votes
1
answer
381
views
Handling an expired long lived access token, server side - facebook
In my web app, I need to post on users facebook feed while they are offline. I already store long lived access tokens for the users. But these tokens also expire after 60 days.
The FB docs mention ...
0
votes
1
answer
2k
views
how to create Facebook Access Token with ads_management permission
we used to have a working augmented system to login facebook and get&manage advertisement data. then we need to change the facebook account password of the user we used for login automatically in ...
1
vote
1
answer
872
views
Facebook SDK v4 Access Token Expiration
So I am creating an app that pulls the events from a page I manage and generates a calendar. Obviously there is no need for the client viewing this page to ever see a login screen since I just want to ...
0
votes
1
answer
626
views
Facebook app access token posts are only visible to me and not my friends or followers?
When I post to facebook using my App Access token, it is successfully posted and returns the post id. But I am the only person who can see the post on my wall, no body else can see the post. Please ...
0
votes
1
answer
85
views
Accessing one's profile using Facebook's Php Sdk & Graph API
I wanted to create a small webpage in my website that shows all the activities(statuses) of ONLY my facebook account if anyone visits the page.
So I went over to the facebook developers page and ...
7
votes
1
answer
6k
views
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'.
...
2
votes
2
answers
260
views
Facebook app - client token more than 60 days
I have an applicatoin that gets the birthday of the users threw a form and than it's supposed to write on there wall on there birthday.
Is this possible? even if they visit the app today and there ...
1
vote
4
answers
31k
views
How to get user profile info using access token in php-sdk
I want to get user profile using access token that i have already generated, and if the access token is invalid it shoud display error. anyone can help to do this ? i want php code to handle this. i ...
3
votes
1
answer
5k
views
How to check the access token is valid or not without using appId and secret?
I have an access token. I want to check the access token is valid or not using php-sdk. Is anyway to check the access token is valid or not ?
0
votes
0
answers
112
views
Facebook Graph API - What is the correct Access Token for my purpose?
I'm creating a webpage for a business, I want to pull specific information via facebook (business hours, etc). I'm successfully doing that through Graph, however I have to regenerate a new token ...
0
votes
1
answer
249
views
How can I get my facebook personal profile posts using getAccessToken()?
What I am actually trying to do is to retrieve my posts/statuses from my personal facebook profile page (this is not a fan page) and display them in my website. Also please note that every user that ...
0
votes
2
answers
70
views
Posting a Feed on a Administered Facebook Page
I am trying to post on a page I administered in Facebook and I use this code.
$fb_key['key'] = 'fb_access_token';
$access = Model_const::read_key($fb_key);
$f = new facebook\fb($cfg);
$f->...
0
votes
1
answer
72
views
Facebook Link Publishing Error
Using the code under ... when ever i try to post a link to facebook page it posts as my account but when i remove the link below it post it as the page itself .... ? I want to post the link too but as ...
0
votes
1
answer
160
views
Access facebook profile information
I am planning to come up with a website to access the profile information of my friends on Facebook. The first step being is to authenticate a friend with their facebook user name and password. I am ...
0
votes
2
answers
2k
views
Permanent access token to an app that posts to a fan page - error code:1
I'm following the steps very well described here https://stackoverflow.com/a/18399927/2510225 , but, from my server, I receive the following error:
{"error":{"message":"The access token does not ...
2
votes
2
answers
1k
views
Facebook - Beyond the 2 months token expiry date for apps
I get client events through a Facebook app. They launch the app and give me the permissions to be able to retrieve their events.
Every day I retrieve their events by using the token given by ...
0
votes
1
answer
234
views
Facebook Php Api basics
Im getting started with the php sdk, and struggling to understand a few things (I have a basic example below - but everytime the pic goes to MY wall and not the fan page)
Code:
require_once("...
1
vote
0
answers
165
views
Facebook extended access token doesn't work
I'm using the read_stream permission to get comments,likes and shares info by a user on a particular page. For that I need a long lived access token as I need to poll the servers and update them ...
0
votes
2
answers
116
views
How to leave user signed-in in facebook canvas app after having got an extended auth token?
I have gotten an extended auth token via PHP SDK 3.2.2.
$facebook->setExtendedAccessToken();
$access_token = $_SESSION["fb_".$cfg['app_id']."_access_token"];
$facebook->setAccessToken($...
1
vote
1
answer
2k
views
Facebook access tokens, permissions and offline publish_actions
I am working on an app where one of the things that I want to do is publish a status on behalf of a user, offline. That is when the user is not using the app. The facebook's documentation is not clear ...
17
votes
3
answers
25k
views
How do I get the App Access Token via the Facebook PHP SDK?
I'm trying to retrieve the app access token of my app in order to post notifications, but for some reason, it doesn't work. Here's the code:
$AppParams = array(
'client_id' => 'myclientid',...
0
votes
1
answer
203
views
PHP-API, post to wall posts as user and not as site when link is added
I'm trying to post to a wall of a site from my php-application. It works fine, I can add a post as a site (means the post appears as being from the site on the wall).
When I add a link to the post the ...
0
votes
3
answers
666
views
Facebook Events Display Order
I made a page where you can see Event from a Public Page
The PHP Code
<?php
require 'src/facebook.php';
$facebook = new Facebook(array(
'appId' => 'ID',
'secret' => 'SECRET',
'...
2
votes
1
answer
5k
views
How to get/use User access token for Facebook Open Graph (as a cron job)?
I use following code with Facebook PHP-SDK to access a page feed:
require 'facebook.php';
$facebook = new Facebook(array(
'appId' => 'xxxxxx',
'secret' => 'yyyyy',
));
$feed = $facebook-&...
2
votes
1
answer
2k
views
Exchanging Facebook Auth Code for Access Token using the PHP SDK
I am trying to build a server-to-server auth flow using the Facebook PHP SDK and no Javascript, as outlined here. So far, I have successfully created a LoginUrl that lets the User sign in with ...
0
votes
1
answer
97
views
How can I get the access token of my app so I can post on a page as a page?
I have an application which I use to post as a page on the Facebook page itself. I want to know how can I get the access token dynamically (because it expires every hours or 60 days).
Here's the code ...
0
votes
1
answer
7k
views
Facebook app help on basics and access token PHP SDK for a beginner
I would like to know how can I get an access token easily for my Facebook app? I'm new to this so a step by step explanation would be appreciated. I intend on making an app which displays user's data ...
8
votes
3
answers
11k
views
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?...
6
votes
2
answers
54k
views
OAuthException : An active access token must be used to query information about the current user
I'm trying to run the sample code for Facebook connect that I downloaded from http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
I get this error message :
[error] =&...
4
votes
2
answers
5k
views
How to extend Facebook User Access Token using PHP SDK?
I have this code:
$facebook->api("/oauth/access_token?grant_type=fb_exchange_token&client_id=".$facebook->getAppId()."&client_secret=".$facebook->getAppSecret()."&...
0
votes
0
answers
110
views
Access token gets lost after visiting another page
When I visit index.php, everything works well and I see the acces_token appear in the session variable.
However, when I click on a link to go to a new page, and I click (on the new page) on a link ...