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 7867769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:47:47+00:00 2026-06-03T00:47:47+00:00

I am using the following url for sending an app generated request to a

  • 0

I am using the following url for sending an app generated request to a user:

https://graph.facebook.com/apprequests/?ids=“.$userid.”&message=Hello&access_token=”.$appToken.”&method=post

This works fine if the $userid is set as current logged in user. But I am not able to send a request to my friend who is an app user and the above code throws the following error:

{“error”:{“message”:”(#2) Failed to create any app request”,”type”:”OAuthException”,”code”:2}}

  • 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-03T00:47:48+00:00Added an answer on June 3, 2026 at 12:47 am

    This worked for me:

    $app_id = YOUR_APP_ID;
    $app_secret = YOUR_APP_SECRET;
    
    $token_url = "https://graph.facebook.com/oauth/access_token?" .
    "client_id=" . $app_id .
    "&client_secret=" . $app_secret .
    "&grant_type=client_credentials";
    
    //your app access token
    $app_access_token = file_get_contents($token_url);
    
    $apprequest_url ="https://graph.facebook.com/" .
    $your_friend_id .
    "/apprequests?message='some message'&" .
    $app_access_token . "&method=post";
    
    $result = file_get_contents($apprequest_url);
    echo $result;
    

    Hope it helps

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

Sidebar

Related Questions

Im sending a simple url request using the following url: urlString = [NSString stringWithFormat:
I'm calling the following URL using YQL http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22UTG.L%22)%0A%09%09&format=json&env=http%3A%2F%2Fdatatables.org%2Falltables.env&callback=cbfunc this returns the following in JSON
I was just trying to convert a PPT using the following URL http://code.google.com/p/qifei/wiki/PDFConverter python
Using the following URL, http://www.linkedin.com/signal/?type=updates&keywords=linkedin&pplSearchOrigin=GLHD&pageKey=member-home&search=Search I can get all the recent updates of the
I am using in App purchases in my application. I am sending a request
I try to get this following url using the downloadURL function as follows: http://www.ncbi.nlm.nih.gov/nuccore/27884304
I open a pop-up window using following code in main.html function openwindow(url) { window.open(url,
I'm using a GET variable and people get to it by the following URL:
I am using the Google Maps api. When I take the following URL and
I am using the following code to attempt to redirect a dynamic URL to

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.