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

  • Home
  • SEARCH
  • 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 8146403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:59:05+00:00 2026-06-06T13:59:05+00:00

I’m trying to get information regarding apprequests sent by my application (see https://developers.facebook.com/docs/reference/api/user/#apprequests ),

  • 0

I’m trying to get information regarding apprequests sent by my application (see https://developers.facebook.com/docs/reference/api/user/#apprequests), but even after providing my app access token, I’m getting this response whenever I try to access an apprequest object in the Graph API:

{
  "error": {
    "message": "An access token is required to request this resource.", 
    "type": "OAuthException", 
    "code": 104
  }
}

I retrieve my app access token by issueing a GET request to the following URL:

https://graph.facebook.com/oauth/access_token?client_id=APP_KEY&client_secret=APP_SECRET&grant_type=client_credentials

I then try to access the apprequest object by hitting

https://graph.facebook.com/REQUEST_ID?access_token=APP_ACCESS_TOKEN

When I hit this URL, I get the error as defined above. I’m providing the access_token in the URL, so this error is either a bug or I’m misunderstanding the documentation, but I think a Facebook blog post (see https://developers.facebook.com/blog/post/464/) gets apprequest information in the exact way as I have above (getting app access token, request apprequest by hitting Graph API).

Thanks for the help!

  • 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-06T13:59:06+00:00Added an answer on June 6, 2026 at 1:59 pm

    I had the same problem just now. Probably you had solve it by now, but I will reply anyway for everyone who arrives here.

    If you notice the $apprequest_utl you will see that it’s something like

    https://graph.facebook.com/USER_ID/apprequests?message=Request_Message&data=somedata&access_token=ACCESSTOKEN&method=post

    Here, what was supposed to be “&” is in fact “&”, which anyway is the same but doest not work with facebook apps with php function file_get_contents. Instead, use curl and all works fine!

    <?php 
    
    function app_request ($request_string,$app_id,$app_secret,$user_id,$type) {
    
      $token_url = "https://graph.facebook.com/oauth/access_token?" .
        "client_id=" . $app_id .
        "&client_secret=" . $app_secret .
        "&grant_type=client_credentials";
    
      $app_access_token = file_get_contents($token_url);
    
      $request_string=utf8_encode($request_string);
    
      $apprequest_url ="https://graph.facebook.com/" .
        $user_id .
        "/apprequests?message=" .
        $request_string . 
        "&data=" .
        $type . 
        "&" .
        $app_access_token . "&method=post";
    
      $result = curl($apprequest_url);
      echo "Request id number: " . $result;
    
    }
    
      function curl($url){
    
            $curl = curl_init($url);
            curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
            curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0);
            return curl_exec($curl);
            curl_close($curl);
    
    }
    
    //Call the function and make the app request!
    app_request("Test",$APP_ID,$APP_SECRET,$USER_ID,"Test");
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put

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.