简体   繁体   中英

Upload image to site and facebook

I need to upload an image to my site for storage, plus upload to facebook as well, hopefully in one process. I've found the FB api for uploading to fb using their own dialogs, but that won't do because I need it on my server too. I'm thinking that maybe uploading to my server first, then using the FB API to upload to FB. How would one handle the authentication on the server side? Maybe there's a better way?

Your idea to upload it to the server and then to Facebook is quite possible. Authenticate against the Facebook server client-side then send the picture and OAuth token to the server. Save the picture on your server then use the OAuth token to upload it onto the Facebook server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM