How To Use the Graph API to Upload Photos to a user’s profile?

How-To: Use the Graph API to Upload Photos to a user’s profile

  • I am developing an application which uploads images into user's profile.I manage to do this by referring this blog https://developers.facebook.com/blog/post/498/ Everything works fine and display the 'id' of the uploaded image. Now I want to take this id into a variable and pass it to another file without displaying 'id' of the image(Lets say I want to pass this id into a.php file and display the 'id' using 'echo' command). Can any one help me to do this? I think this is not a difficult task.Since I have vary poor knowledge about php, I cannot figure out any way. Can any one please please help me to solve this problem. Thanks.

  • Answer:

    What do you mean by "pass into another php file?" If you mean reload the page but with passing the ID you can use $_GET array. Simply, after receiving the id from uploaded photo you can call function: header('location : http://yourdomain.com/a.php?id='.$id_of_photo); and then in a.php you can get it by accessing $_GET array if(isset($_GET['id'])) { echo 'uploaded photo id is: '.$_GET['id']; }

Roshanck at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.