开发者

Facebook: Redirect based on whether user has shared or not

开发者 https://www.devze.com 2023-02-27 04:22 出处:网络
I want to create an iFrame Tab App for Facebook. I am planning on having a share button, so the user can share the tab app. If the user has successfully shared the tab app (= left a post on his wall w

I want to create an iFrame Tab App for Facebook. I am planning on having a share button, so the user can share the tab app. If the user has successfully shared the tab app (= left a post on his wall which is defined by the app) I want to redirect him to let's say www.example.com/user-has-shared.

The way I understand this (http://developers.facebook.com/docs/reference/dialogs/feed/), this should be possible using the redirect_uri parameter.

However, when the user opens the dialog and doesn't click on "publish" but on "skip" instead, he is still redirected to the same page as defined. But I don't want to redirect users who have skipped publishing.

Any ideas? Thanks!

Using PHP开发者_StackOverflow by the way.


I'm not convinced that what you're asking for is possible, and it definitely isn't nice so that's fortunate. From the docs, redirect_uri redirects after any button in the dialog is clicked. Again, this is good.

You shouldn't be doing anything that requires the user post on their wall. While user advertising is nice, making it mandatory is frustrating and many of your users would be frustrated. A better method would be to build an app that people WANT to talk about! ;)


EDIT: Ignore my puffery there, this is totally possible. You check for $_REQUEST[post_id] on the redirect_uri'd page. More details in the comments.

0

精彩评论

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