回答

1

所以這是可能的。我通過設置Facebook應用程序並創建基本身份驗證來實現這一目標。驗證完成之後,我使用JS通過graph.facebook.com傳遞照片的FBID和用戶的access_token以通過POST從返回的URL和表單中提取access_token參數以通過POST提交喜歡的圖片。看起來像這樣。

 <form> 
     <a id="facebook-authentication" href="https://graph.facebook.com/oauth/authorize?type=user_agent&client_id=[YOUR_APP_ID_GOES_HERE]&redirect_uri=[YOUR_DESIRED_REDIRECT_PAGE_GOES_HERE]&scope=offline_access,publish_stream"> 
     <div id="facebook-authentication-button"> 
     START THE VOTE! 
     </div> 
     </a> 
     </form> 

一些額外的JS用來重定向時自動提交表單,但是這是沒有必要設立提交類似POST請求的。