facebook-javascript-sdk

Messenger Extensions Javascript SDK Error 2071011

自古美人都是妖i 提交于 2020-01-12 02:26:09
问题 I'm trying to create a Messenger Web View (https://developers.facebook.com/docs/messenger-platform/messenger-extension) by using the Messenger Extensions Javascript SDK. The page opened by the Web View has the following JS code <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 = "//connect.facebook.com/en_US/messenger.Extensions.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script

Unable to Access User's email. Getting “Undefined”

心不动则不痛 提交于 2020-01-11 05:40:11
问题 I have a website with the Facebook login implementation. My app has the permission for the user's email. Even though the user logs into my app using Facebook I can only retrieve his/her name or basic info. Not the email. So, here's the code I literally copied from the Facebook Developers Website: window.fbAsyncInit = function() { FB.init({ appId : 'xxxxxxxxxxxxxxx', // App ID channelUrl : '//domain.org/channel.html', // Channel File status : true, // check login status cookie : true, //

Uncaught ReferenceError: FB is not defined

笑着哭i 提交于 2020-01-10 07:51:08
问题 I know this question is asked frequently, but I have not found the solution. I use this code: open the html tag with <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"> in the index immediately after the opening tag I entered this <div id="fb-root"></div> <script> window.fbAsyncInit = function() { // init the FB JS SDK FB.init({ appId : 'MY_APP_ID', // App ID from the app dashboard status : true, // Check Facebook Login status xfbml : true // Look for social plugins on

Is there a way to send a conversion event to Facebook using their API?

不问归期 提交于 2020-01-07 07:08:11
问题 I'm working on a SaaS service. There are certain events that happen on the backend which I'd like to use as conversions for Facebook Ads . I figured out there's a way to send a custom event using the Facebook js-pixel . I can't use JS for the events I'd like to track. Maybe it's possible to use something like a good old-fashioned cURL ? Thanks! 回答1: Yes, there is the Offline Conversions API With Facebook's Offline Conversions API you can send your offline conversion events using an offline

Insert to database after user has shared content on facebook

与世无争的帅哥 提交于 2020-01-07 06:24:09
问题 I am working on a Facebook tap app. In the app the user selects an item page and in there he can write a comment about the item. After he has written his comment he clicks a button that opens up a facebook share dialog and the user comment is in the dialog box. What I want to accomplish is inserting the comment to a database when the user clicks share and if he clicks cancel nothing happens. Here is the function that I use to open up the dialog: function FacebookPostToWall() { var comment =

FB.getLoginStatus() needs page refreshed

大城市里の小女人 提交于 2020-01-07 02:17:19
问题 I am using FB.getLoginStatus() and FB.Login() to log the user into my website using facebook. I first check for the status on page load using FB.getLoginStatus() and save the state in a hidden variable. When the user clicks on my facebook login button, I first check the value in the hidden variable and call FB.Login() only if FB.getLoginStatus() is not connected. If FB.getLoginStatus() returns 'Connected', then I just log the user into my website without FB.Login(). My scenario with issue

Facebook Accountkit Javascript mobile form not showing - iOS 9.3

荒凉一梦 提交于 2020-01-06 21:47:32
问题 I am trying to implement the facebook accountkit using javascript. I've solved the 'api is not supported' error by using the Accountkit version: v1.0 It works fine on PC, but it has an error on iOS. The form of country_number and phone_number is not showing on iOS. I've tested in safari, chrome app, ionic webview. You can also test on this url : http://www.purepeople.co.kr:8888 How can I show the AccountKit login form on iphone? 来源: https://stackoverflow.com/questions/36720128/facebook

Facebook FQL url likes of friends work strange

北慕城南 提交于 2020-01-06 15:18:12
问题 Hi I would like to count the url likes of my friends based on a given url, I have the following piece of code: function mQ(url){ FB.api({ access_token:'CAACEdEose0cBABMG67fV8Yn5cHo5fkb6kT6npRWO7YQL8zagoFLrz5OFLFIEPVUJhMwf9rql9oAqktDUJMKBGr5NNRXJ73jf418gspbfklvdJs6Kx1EkCRutYhSnSW4Binb4F9AlOUIHfXZC052SOdlgtxTSng6gM4CAZAstpLAoOd1p5pnCpNadnlluMqOxjHo1jx1QZDZD', method: 'fql.multiquery', queries: { "query1":"SELECT total_count, like_count, click_count, normalized_url FROM link_stat WHERE url='"

how to detect log out from fb using JS SDK without refreshing the page

穿精又带淫゛_ 提交于 2020-01-06 14:21:20
问题 Hi friends, I'm developing a website in which Facebook Javascript API is used to send message to our friends. When the user is logged out of fb,then it shows an error when popping up js API dialog box which is "Refused to display 'https://www.facebook.com/login.php?api_key=0&skip_api_login=1&display=dialo…cale%3Den_US%26name%3DAnything%26to%3D1791715188%26from_login%3D1&rcount=1' in a frame because it set 'X-Frame-Options' to 'DENY'." Currenty,I'm using FB.getLoginStatus to detect whether the

After FB.ui feed popup don't close after send post

被刻印的时光 ゝ 提交于 2020-01-06 13:58:32
问题 How close FB.ui feed dialog after send post. After click send i see white popup. How fix this problem? Also in Chorme Browser console i see https://s-static.ak.facebook.com/connect/xd_arbiter/inP_iYjVh9g.js?version=41 Failed to load resource: net::ERR_INSECURE_RESPONSE 回答1: For the FB.ui share dialog I've achieved this with a little help from jQuery: $('#fb_dialog_loader_close').trigger('click'); I had to do it this way because the dialog didn't close when an error was returned. Obviously