Stan
Stan

Reputation: 26511

Upload photo with Graph API - redirect back to site afterwards?

I have working code that will upload photo from form. However when I do submit form it redirects me to https://graph.facebook.com/me/photos?access_token=mytokencode and content is

{
   "id": "116980435091338"
}

The question is: How can I redirect from this back to my site? Is it even possible? Maybe I should pass some additional parameter like, for example ?redirect_to=http://site.com/.

And also is it possible to get photo ID back to PHP somehow so I can get photo URL?

Upvotes: 2

Views: 496

Answers (1)

DMCS
DMCS

Reputation: 31870

You can submit your form to the server and have the server do the HTTP POST command instead. See this example from Facebook:

http://developers.facebook.com/blog/post/498/

Upvotes: 1

Related Questions