开发者

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 ph开发者_运维问答p, I cannot figure out any way.

Can any one please please help me to solve this problem.

Thanks.


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'];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜