开发者

Facebook app without asking permission on load

How do I make an app that doesn't ask for permission when you load it?

Or is that impossible? The only thing the开发者_运维知识库 application does is post to the user's wall, but can't I authenticate for that after they load the application?


You can, not sure why others are so positive that it is not possible.

On your server side you can check through facebook api if current user granted you required permission. If not, pass some flag to your fbml where you can display permission prompt link:

Would you like to <fb:prompt-permission perms="publish_stream">allow us</fb:prompt-permission> to post on your wall?

You are not obligated to require users to authorize your app either (but you need authorization before checking for granted permissions or retreiving any user information), you can still allow users to use your app. In fact allowing users to use an app without authorization is even encouraged by facebook recommendations. For optional authorization you can put such fbml on your page:

<fb:if-is-app-user> 
    <fb:else><a href="http://www.facebook.com/login.php?api_key=...&v=1.0>Would you like to authorize this app?</fb:else> 
</fb:if-is-app-user>


If you want to post to their wall via a prompt instead of requiring prior authorization, you should use the connect library. Then you can use some javascript to open the dialog.

In fact, another SO question gives you exactly what you need.


Or is that impossible. The only thing the application is going to do is post to the users wall, but can't I authenticate them for that after they load the application?

To publish content to users' walls, you need to have the steam_publish permission from them first.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜