Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8795339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:22:24+00:00 2026-06-13T23:22:24+00:00

is it possible to get access token without user authorization with PHP? I need

  • 0

is it possible to get access token without user authorization with PHP? I need user access token to get photos from Facebook fan page:

$photoQuery = urlencode('SELECT pid,src_big,src_small,caption,link,position FROM photo WHERE aid = "'.$albumId.'"');    
$photoFQL = 'https://api.facebook.com/method/fql.query?query='.$photoQuery .'&access_token='.$access_token.'&format=xml';   
$photoResults = file_get_contents($photoFQL);   

With user authorization it worked perfectly well, but without it I don’t know how to get right access token. I’ve tried to get it like this:

$url = 'https://graph.facebook.com/oauth/access_token?client_id=xxx&client_secret=xxx&grant_type=client_credentials';
$x = curl_setopt($ch, CURLOPT_URL, $url);       
$accessToken = curl_exec($ch);
curl_close($ch);

So actually I get the access token, but its not working with photos retrieve. Maybe the problem is that Facebook fan page is alcohol related so its not possible to get correct token without authorization or maybe Im doing something wrong.

So any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:22:25+00:00Added an answer on June 13, 2026 at 11:22 pm

    If a Facebook page has any user restrictions like alcohol, age, or country, you can only get that page’s posts using a user access_token that meets the set criteria.

    This is to prevent a user who shouldn’t be seeing that page’s information from gaining access to it through an app.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible to get an valid access token for an user via a
Is it possible to somehow get an access token to use the facebook api
I try to get a access token from facebook with my (in creation) facebook
Is it possible to invalidate a facebook access token? I need to do this
Possible Duplicate: How to get random record from MS Access database In my project
Possible Duplicate: Get all files from VSS for a given date? I need to
Is there a reliable way of getting access token errors from the facebook platform?
I would like to get the photo urls from the from this album: https://graph.facebook.com/175758929145317/photos
So I need to get the events for a facebook page (in JSON format
I'm trying to post a photo to Facebook page from user using Facebook SDK

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.