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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:59:38+00:00 2026-05-30T08:59:38+00:00

How i can upload image or photo on Facebook Wall using Outh_key or access

  • 0

How i can upload image or photo on Facebook Wall using Outh_key or access token without login using PHP?

Please help me & thanks a lot.

  • 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-05-30T08:59:40+00:00Added an answer on May 30, 2026 at 8:59 am

    Here are some various ways to upload photos using the Graph API. The examples assume you’ve instantiated the $facebook object and have a valid session.

    1 – Default Application Album of Current User

    This example will upload the photo to your default application album of the current user. If the album does not yet exist it will be created.

    $facebook->setFileUploadSupport(true);
    $args = array('message' => 'Photo Caption');
    $args['image'] = '@' . realpath($FILE_PATH);
    
    $data = $facebook->api('/me/photos', 'post', $args);
    print_r($data);
    

    2 – Target Album

    This example will upload the photo to a specific album.

    $facebook->setFileUploadSupport(true);
    $args = array('message' => 'Photo Caption');
    $args['image'] = '@' . realpath($FILE_PATH);
    
    $data = $facebook->api('/'. $ALBUM_ID . '/photos', 'post', $args);
    print_r($data);
    

    you can also specify this in the Facebook constructor:

    $facebook = new Facebook(array( 'appId' => 'ID', 'secret' => 'SECRET', 'fileUpload' => true, 'cookie' => true));
    

    Another Option

    //upload photo
    $file= '/path/filename.jpg';
    $args = array(
       'message' => 'Photo from application',
    );
    $args[basename($file)] = '@' . realpath($file);
    $ch = curl_init();
    $url = 'http://graph.facebook.com/'.$album_id.'/photos?access_token='.$access_token;
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
    $data = curl_exec($ch);
    //returns the photo id
    print_r(json_decode($data,true));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to upload an image using Zend_Service_Nirvanix. Is it even possible? I
I can succesfuly upload pictures to my own wall by posting an image to
I was trying to upload a photo on facebook using a browser with no
Please recommend an image sharing service that can be called programmatically to upload a
I have a site where I can upload an image, and i am using
I'm writing the PHP/webserver side of an image upload for an iOS app. Using
We have a webapp where people can upload various image file types and on
In a rather simple ASP.NET application where the user can upload a image, mostly
I am strictly following the answers from How can I upload a photo to
I have a form to upload image like below <form name=sample enctype=multipart/form-data action=index.php method=post

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.