facebook-javascript-sdk

FB.getLoginStatus always returns status='unknown'

一笑奈何 提交于 2019-12-30 11:27:28
问题 If I am logged into facebook.com, I expect a call to FB.getLoginStatus will return a status='not_authorized'. Instead it returns status='unknown', even if I pass true for the 'force' parameter. If I call FB.login, and then call FB.getLoginStatus, I get status='connected'. Makes sense. If I call FB.login, reload the page, and then call FB.getLoginStatus, I get status='unknown'. Does not make sense. If I add 'true' as the second parameter (i.e. force), I still get status='unknown'. (I expect

Checking Facebook login state in a webView always returns unknown

ぃ、小莉子 提交于 2019-12-30 10:23:24
问题 I am developing a webapp that is wrapped in a native app for both iOS and Android. This is done by simply displaying the webapp in a webView for both platforms. I am having issues with the Facebook login and the Android platform. Logging in to Facebook works via my "hack" but when the application is checking the login state afterwards it always returns unknown (which indicates that the SDK does not know if the user is logged into Facebook or not). The webView: WebView mainWebView = (WebView)

Checking Facebook login state in a webView always returns unknown

試著忘記壹切 提交于 2019-12-30 10:23:20
问题 I am developing a webapp that is wrapped in a native app for both iOS and Android. This is done by simply displaying the webapp in a webView for both platforms. I am having issues with the Facebook login and the Android platform. Logging in to Facebook works via my "hack" but when the application is checking the login state afterwards it always returns unknown (which indicates that the SDK does not know if the user is logged into Facebook or not). The webView: WebView mainWebView = (WebView)

Facebook Like Box not loading on Ember app

冷暖自知 提交于 2019-12-30 07:42:27
问题 I'm trying to get the like box to work inside our ember app, in a template called about . The problem is that if I enter the ember app from another route (instead of about route), then navigate to the about route with link-to helpers, then the like box is not rendered. Instead, if I enter/refresh the about route directly, it renders just fine. Any ideas on how to make it render even if somebody navigates to that route from another route ? templates/about.hbs: ... <div class = "fb-like-box"

Facebook Like Box not loading on Ember app

一个人想着一个人 提交于 2019-12-30 07:42:08
问题 I'm trying to get the like box to work inside our ember app, in a template called about . The problem is that if I enter the ember app from another route (instead of about route), then navigate to the about route with link-to helpers, then the like box is not rendered. Instead, if I enter/refresh the about route directly, it renders just fine. Any ideas on how to make it render even if somebody navigates to that route from another route ? templates/about.hbs: ... <div class = "fb-like-box"

Facebook Open Graph Single Page Apps

倾然丶 夕夏残阳落幕 提交于 2019-12-30 07:12:30
问题 I have built a single page application using backbone js. I have separate backbone url "routes" for various application states and dynamic content (e.g. books), but essentially Facebook will only ever see the index page. The following SO question seems to provide an interesting approach to providing physical open graph URLs for dynamic content: Multiple Facebook opengraph objects on the same page How have other developers approached using open graph tags on dynamic pages, specifically in

How to make the new facebook post embed feature responsive?

*爱你&永不变心* 提交于 2019-12-30 06:03:53
问题 I couldn't find any solutions on google which can make the newly introduced facebook posts embed to responsive. Does anyone got a solution or tricks? Thanks <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "http://connect.facebook.net/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div class="fb-post"

Using facebook javascript sdk to process fql query

可紊 提交于 2019-12-29 09:24:06
问题 I have just put implemented Facebook connect on my web-site using the JavaScript SDK. Now I would like to process an fql query. So I have two questions: Is it possible using only JavaScript fql as " SELECT id, name FROM user WHERE uid IN (SELECT uid1 FROM friends WHERE uid2=me()) " ? Because when I tried some PHP SDK code using the facebook doc PHP: $app_id = 'MY_ID'; $app_secret = 'MY_APP_SECRET'; $my_url = 'POST_AUTH_URL'; $code = $_REQUEST["code"]; $_REQUEST["code"] is quite normally not

facebook like button not displaying :: FB.getLoginStatus() called before calling FB.init()

家住魔仙堡 提交于 2019-12-29 06:54:09
问题 I just want a basic facebook like button on my site. I follow the instructions per facebooks site (http://developers.facebook.com/docs/reference/plugins/like/). I tried the HTML5 , XFBML , and iFrame ways, no joy on either. So I thought maybe it's something with my site interfering. So I created a bare-bones html page like below and it still gives me the FB.getLoginStatus() called before calling FB.init() error. <html> <body> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs

Get long term access token for Facebook page

北慕城南 提交于 2019-12-29 02:07:12
问题 I'm using Jquery Facebook Wall to retrieve the latest status of a Facebook page and show it in a website. (function($) { $(document).ready(function(){ $('#facebook_wall').facebook_wall({ id: '560124337XXXXX', access_token: 'CXGXhXZA7Wg2XXDcTi7WmX1wp71u5fNXXa9XXX3LmXXx', limit: 1 }); }); })(jQuery); // ... When I use FB Graph API Explorer to get the access token of the page, I get one that expire in only 60 minutes. Is there a way to get a long duration access token ? Or to generate a new one