How can I check facebook page tab app from localhost

I am developing a facebook tab application. When I set the page tab url in the app settings somehow localhost/fbappit doesn't work, as the page tab is not just an iframe. Is there a way around the solution?

EDIT

I am creating a page page tab using ASP.NET MVC-3.0 with the C # SDK flag.

So far, I have been trying to modify the file hoststo indicate the URL that I have on the application settings to localhost (127.0.0.1). I have always tested the facebook application, but it does not work on a tab on a Facebook page.

+5
source share
4 answers

facebook. , http , . , , IIS https ssl. . , , .

0

url set

http://localhost/yourpagetabdir/

setting on facebook

frmlocalhost, ASP.Net Development, IIS, , IIS iframe.

, u

 Facebook.FacebookConfigurationSection s = new FacebookConfigurationSection();
                s.AppId = "AppID";
                s.AppSecret = "Secret";
                FacebookWebContext wc = new FacebookWebContext(s);
                dynamic da = wc.SignedRequest.Data;
                dynamic page = da.page;
                string curpageid = page.id;
                bool isLiked = page.liked;
                bool isAdmin = page.admin;
+3

, http://example.com http://localhost/yourapp

:

This should work as iframe points to a valid url that on your local machine points to your content. Please note that this will not work if you access the tab from other computers, since for them the URL will point to something else (or nothing, depending on which domain name you choose).

+1
source

For example, using the FB PHP SDK, you can publish signed_request and parse it in a few lines: -

require_once ("facebook.php"); // this file comes from the SDK
$config = array();
$config['appId'] = 'get_appID_from_app_menu';
$config['secret'] = 'get_secret_below_appID';
$facebook = new Facebook($config);
$signed_request = $facebook->getSignedRequest();
print_r($signed_request);

Avoid this detailed example on the FB blog. Good luck codes :)

0
source

All Articles