问题
As from the title I am trying to use tha facebook notifications api. I have read the documentation and I am trying to do a POST to the graph like the one following:
String notificationURL =
"https://graph.facebook.com/" +
String.valueOf(facebookUserId) +
"/notifications?" +
"access_token=444146492324422|8LOOIj7xPT2LFlx14_3SqKCDgVc" +
"&href=https://apps.facebook.com/Nmctesting" +
"&template=@["+String.valueOf(facebookUserId)+"]! You have won!!";
the access token is the one returned from the graph query :
String appAccessURL = "https://graph.facebook.com/oauth/access_token?client_id=444146492324422"+
"&client_secret=[MYAPPSECRET]" +
"&grant_type=client_credentials";
I have tried to use the access token of the logged in user, who was the admin at that time, but It didn't work.
For any test that I do I get the html page as a response which states "Sorry, something went wrong"
what did went wrong?!
Thanks in advance!
回答1:
Make sure your FACEBOOK_USER_ID is a valid facebook username. You may need to URI escape it first. If it's the correct username, https://www.facebook.com/FACEBOOK_USER_ID will be the user's facebook page, so try hitting it in a browser before you try anything else.
来源:https://stackoverflow.com/questions/14872984/trying-to-send-facebook-notification-results-in-sorry-something-went-wrong-r