开发者

Facebook application under a Fans page TAB?

开发者 https://www.devze.com 2023-01-05 09:39 出处:网络
I managed to build a basic IFrame application, using the Graph API. I wanted to be able to load this application via Fans Pages\' tabs - Only to realize Facebook doesn\'t like the idea of using iframe

I managed to build a basic IFrame application, using the Graph API. I wanted to be able to load this application via Fans Pages' tabs - Only to realize Facebook doesn't like the idea of using iframes under said tabs. (I know of a workaround, which is not acceptable...)

So I gather I should start over doing it a Static FBML Application, and not IFrame - for meeting my tabs requirement. My question is... where do I start? How do I auth a specific application?

any helpful references/guides will be very appreciated. (avoid links to Facebook's documentation, they're 开发者_JS百科sad.)

Thanks, Doori Bar


How to prompt a user to authorize an app from FBML:

<fb:if-is-app-user> 
    <fb:else>
        <a href="http://www.facebook.com/login.php?api_key={$fbApiKey}&v=1.0">Authorize This App</a> 
    </fb:else> 
</fb:if-is-app-user>

How to ask for extra permissions:

First you will need to check from PHP FB Api if user has granted you required permissions, if not, then pass some flag to FBML to display this code:

<fb:if-is-app-user> 
    <?php 
        if($noPermissionFlag) {
            echo '<fb:prompt-permission perms="publish_stream,email">Would you like to allow this app posting to your wall?</fb:prompt-permission>';
        }
    ?>
</fb:if-is-app-user>

That's how it would work in a regular FBML canvas app. Not sure about putting this in tab.

0

精彩评论

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