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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:49:29+00:00 2026-06-02T08:49:29+00:00

Please help. The code to upload photos to an album by. After changing the

  • 0

Please help. The code to upload photos to an album by. After changing the code was not working, reports error {“error”: {“message”: “(# 240) The references target_id an inactive user”, “type”: “OAuthException”, “code”: 240}} I tried everything I have nothing but think. I’m looking professional and support here. Thank you for every answer.

$app_id = "xxxxx";
$app_secret = "xxxxxxx";
$post_login_url = "http://redirectpage";
$album_id = "1";
$photo_url = "http://myimg.com";
$photo_caption = "xxxxxxxxx";
$code = $_REQUEST["code"];
if (!$code){ 
 $dialog_url= "http://www.facebook.com/dialog/oauth?"`enter code here`
  . "client_id=" .  $app_id
  . "&redirect_uri=" . urlencode( $post_login_url)
  .  "&scope=publish_stream";
echo("<script>top.location.href='" . $dialog_url
  . "'</script>");
} else {
$token_url="https://graph.facebook.com/oauth/access_token?"
  . "client_id=" . $app_id
  . "&client_secret=" . $app_secret
  . "&redirect_uri=" . urlencode( $post_login_url)
  . "&code=" . $code;
$response = file_get_contents($token_url);
$params = null;
parse_str($response, $params);
$access_token = $params['access_token'];


$graph_url= "https://graph.facebook.com/" 
  . $album_id . "/photos?"
  . "url=" . urlencode($photo_url)
  . "&message=" . urlencode($photo_caption)
  . "&method=POST"
  . "&access_token=" .$access_token;

echo '<html><body>';
echo file_get_contents($graph_url);
echo '</body></html>';
}
  • 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-02T08:49:31+00:00Added an answer on June 2, 2026 at 8:49 am

    Are you sure that the current user has authorized the application (installed it)?

    Also, this bug report: Photo upload via PHP SDK OpenGraph is among the first results for gooling “The references target_id an inactive user”.

    I’m not much of a php expert, but this does not seem like the correct way to POST an image, maybe you should use the method shown in the code in that bug report.

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

Sidebar

Related Questions

the following code is not behaving like I would expect. Please help me understand
When I upload the image it is showing this error please can u help
Please can someone help? I have the following code which uploads a file to
i am new in php i have a problem in my php code.please help
Please help me to rectify my code. Here I have described the code what
Could anyone please help me convert this code to vb.net, I have tried it
Could someone please help me with the code for below requirement or scenarios...I achieved
I have problem to add jQuery to some existing code, please help. We have
Please, help me. I dont know what is wrong with this code: import android.appwidget.AppWidgetProvider;
Help, please. The code - just a styled pre and a styled div (using

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.