SOLVED: How to require user to login fb before accessing Facebook Canvas App webpapge directly? -


i new facebook app. developing first facebook canvas app links webpage hosting on server.

i can access app either: (1) go facebook app (http://apps.facebook.com/myappname), or (2) directly access webpage through url(http://mywebsite.com/myapp).

i have set http://mywebsite.com/myapp canvas page in fb dashboard settings.

i want avoid (2) requiring user login fb first before can access page. know how can that?

this may stupid question, have read fb api documents (fb official guide talks lot setting custom login page) , searched through lot of questions doesn't seem fit need.

update:

i have tried putting following in webpage:

<script> top.location.href = 'http://apps.facebook.com/myappname'</script> 

in case, if user access page (1), there's no problem. if user access page (2), user redirected facebook.

however in client side can still view content of webpage if user not logging in facebook. want achieve in server side.

thank much!

i have solved problem using examples facebook php sdk version 3.

https://github.com/facebookarchive/facebook-php-sdk/blob/master/examples/example.php


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -