facebook-javascript-sdk

New way to detect Facebook API user currency

本秂侑毒 提交于 2019-12-01 07:42:01
问题 Since currency field is deprecated form January 08, 2019, you can find user_currency in payment_mobile_pricepoints object. Don't forget to add payment_mobile_pricepoints into requested fields list FB.api("/me", {fields:"payment_mobile_pricepoints"}, function(result){ var currencyCode = result['payment_mobile_pricepoints']['user_currency']; }); Hope it helps to somebody 回答1: Since currency field is deprecated form January 08, 2019, you can find user_currency in payment_mobile_pricepoints

OAuthException “(#210) Subject must be a page.”

那年仲夏 提交于 2019-12-01 03:42:23
I Keep getting OAuthException (#210) Subject must be a page. error even if I am using the Page Access Token and not the App Access Token . I am using the following: Latest JavaScript SDK from facebook (//connect.facebook.net/en_US/all.js ) Calling the /{PAGE_ID}/tabs?app_id={APP_ID}&method=POST&access_token={PAGE_ACCESS_TOKEN} using the FB.api method once the user is logged in. My Application is not FBML but a Canvas / iFrame App. What am i doing wrong? I have researched the web including the Stackoverflow and other facebook forums but still no answer on this. OAuth is Enabled for my

Facebook Like Box not loading on Ember app

坚强是说给别人听的谎言 提交于 2019-12-01 01:35:44
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" data-href = "https://www.facebook.com/app-link" data-width = "250" data-height = "313" data-colorscheme =

OAuthException “(#210) Subject must be a page.”

空扰寡人 提交于 2019-12-01 01:09:51
问题 I Keep getting OAuthException (#210) Subject must be a page. error even if I am using the Page Access Token and not the App Access Token . I am using the following: Latest JavaScript SDK from facebook (//connect.facebook.net/en_US/all.js) Calling the /{PAGE_ID}/tabs?app_id={APP_ID}&method=POST&access_token={PAGE_ACCESS_TOKEN} using the FB.api method once the user is logged in. My Application is not FBML but a Canvas / iFrame App. What am i doing wrong? I have researched the web including the

Multiple Facebook App IDs in my application

狂风中的少年 提交于 2019-12-01 00:31:08
In our Angular JS application, we have login with Facebook and share to Facebook functionality. For login with facebook, we have an app Id. We go through the setup routine and FB.init is called with this App ID. When it comes to share, we want to share to facebook using a different APP ID. So my question is how to handle this scenario as I already did FB.init once with login APP ID? 1) I checked Facebook documentation and couldn't find if init accept's two App ID's in the first place. 2) Other idea is, can I create one more object for Facebook SDK that will be named some thing else instead of

Facebook javascript connect with localhost domain

半腔热情 提交于 2019-11-30 23:45:20
I am trying to create facebook connect using javascript which gives follwing error: Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains. Does is due to I am using Localhost server for testing? Do I need to purchase domain to test this or what? Or do I need to make changes in following code: my code: <?php // // uses the PHP SDK. Download from https://github.com/facebook/php-sdk include("facebook-php-sdk/src

Facebook iframe FB.Canvas.setAutoGrow does not auto grow after initial load?

泄露秘密 提交于 2019-11-30 22:34:26
I have been building a facebook tab using html and css and facebooks javascript SDK. I having problems with the iframe resizing to the size of the content. I've managed to get it to work on initial load which is cool, using this below script... <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> - <div id="fb-root"></div> <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({ appId : '00000000000000', // App ID channelUrl : '//www.mywebsite.com/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to

Facebook Login not open in Safari/ iPhone

喜欢而已 提交于 2019-11-30 21:36:36
I am creating one application which show Facebook friend. First, user need to click on login button then one simple popup screen will appear after filling login id and password it will show friend list. Everything ok and run on Firefox, Chrome,IE but it will not open popup in Safari and iPhone. someone suggest me add domain name and channel name in channelUrl . I create one channel.html and add reference but it didn't help me. I search lot's but didn't find helpful. Here is my code. Custom.js function getUser() { FB.init({ appId : '289403314507596', // App ID channelUrl : 'http://bc2-236-161

Uploading a canvas image to facebook as Blob of multipart/form-data type

情到浓时终转凉″ 提交于 2019-11-30 21:31:25
I am trying to use the facebook api to upload an image from a canvas I save on the page: var file = dataURItoBlob(canvas.toDataURL('image/jpeg', 1.0)) FB.api('/me/photos', 'POST', { source: file, message: 'photo description' }, function (response) { console.log(response) } ) This is the blob convertor: function dataURItoBlob(dataURI) { var byteString = atob(dataURI.split(',')[1]); var ab = new ArrayBuffer(byteString.length); var ia = new Uint8Array(ab); for (var i = 0; i < byteString.length; i++) { ia[i] = byteString.charCodeAt(i); } return new Blob([ab], { type: 'image/jpeg' }); } And I am

Email scope is not working which is used in FB Login

女生的网名这么多〃 提交于 2019-11-30 21:12:17
I try to use FB Login on my website and need to get user informations ( email, public_profile, date of birth and location ). But after logged in only name and facebookId of user that I got. Codes : <img src="" alt="" onclick="fblogin();"/> Javascript part : function statusChangeCallback(response) { console.log('statusChangeCallback'); console.log(response); // The response object is returned with a status field that lets the // app know the current login status of the person. // Full docs on the response object can be found in the documentation // for FB.getLoginStatus(). if (response.status =