freshplanet / ANE-Facebook

Air Native Extension (iOS and Android) for the Facebook mobile SDK
Apache License 2.0
221 stars 123 forks source link

Posting a message on the user's wall #222

Closed yvant closed 7 years ago

yvant commented 9 years ago

Hi,

I'm trying to post a message on the user's wall, with his score on my game. Using _facebook.openSessionWithPublishPermissions([], handlerOpenSession); I get a false at the success parameter, and cannot continue with the dialog box

Using _facebook.openSessionWithReadPermissions(["basic_info"], handlerOpenSession); and var data:Object = new Object(); data.method = "feed"; data.link = "http://linktogame.com"; data.caption = "caption"; data.access_token = _facebook.accessToken; _facebook.requestWithGraphPath("/me/feed", data, "POST", onScoreSubmitted); => popup opens and closes _facebook.dialog("feed", data, onScoreSubmitted); => popup opens and closes

It seems like I am doing something wrong, but I don't get what. I also tried using _facebook.openSessionWithPublishPermissions(["publish_actions"], handlerOpenSession); but I don't seem to get the permission to do it, and I have seen that _facebook.dialog doesn't need it anyway...

Can someone help?

Thanks!