I'm trying to build an iframe app for my work through which a user can upload a photo to their photos.
I have managed to get the photos to upload - BUT once the photo is uploaded, my app just shows the new photos ID (endpoint response) and removes everything else from the iframe (as shown in the second link below).
I want to be able to redirect to a success page or even just back to my app without showing this 'endpoint response'.
I have been using this tutorial to get me to where I am: http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development-php-sdk开发者_如何学编程-3-0/
and
https://developers.facebook.com/blog/post/498/
for the upload.
This is the first time I have attempted to build a Facebook app and I am really struggling, any help would really be appreciated.
Cheers,
Andy
If the question is how you can redirect a page a condition is true (i.e. the picture has been uploaded), header("Location: url") might be the answer. When using header location there are two concerns:
1) Make sure that the url you are redirecting to is absolute (including http://lalalala/llala/la)
and
2) Nothing can be outputted before your header. Consider this example:
http://php.net/manual/en/function.header.php
精彩评论