facebook-javascript-sdk

How to fix CSP issues with facebook messenger-checkbox

天大地大妈咪最大 提交于 2019-12-10 14:33:38
问题 I'm trying to make facebook messenger checkbox work, I've added the following code to my html window.fbAsyncInit = function() { FB.init({ appId: "{{ fb_app_id }}", xfbml: true, version: "v2.6" }); FB.Event.subscribe('messenger_checkbox', function(e) { console.log("messenger_checkbox event"); console.log(e); if (e.event == 'rendered') { console.log("Plugin was rendered"); } else if (e.event == 'checkbox') { var checkboxState = e.state; console.log("Checkbox state: " + checkboxState); } else if

How can i get the Facebook page like count without login?

血红的双手。 提交于 2019-12-10 13:38:20
问题 I need to get the facebook page like count without user login. I want to show the count on my webpage. I don't want an FB Button, need to show the count only. I saw that several people are using graph api, But I think it requires an accesstoken, so it also required to login by the user. I don't want that kind of stuffs. Guys help me with a solution. I will also trying, if I get a solution before, will comment here. 回答1: This would be the API call: https://graph.facebook.com/[page-id]?fields

Facebook custom story share using JavaScript sdk() showing error(Action Requires At Least One Reference)

泪湿孤枕 提交于 2019-12-10 13:18:13
问题 I am using JavaScript sdk for one of my Facebook canvas game application. I am trying to implement custom story share dialog to post story on user wall. The information available on developer site is unclear and limited.The bellow code is for sharing custom story using open grap API. Bellow code is available on Facebook developer site link provided(https://developers.facebook.com/docs/sharing/reference/share-dialog). The Facebook provided code is working fine as its using predefined action

Facebook share button is rendered incorrectly

南笙酒味 提交于 2019-12-10 11:51:04
问题 I use the following code to obtain Facebook share button, Facebook like, Facebook Send and Google +1: <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 = "//connect.facebook.net/ar_AR/all.js#xfbml=1&appId=<?php echo Configure::read('FBappId');?>"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <!-- FaceBook SHARE BUTTON HERE

LIke button of facebook will not fire edge.create or edge.remove in web page

瘦欲@ 提交于 2019-12-10 10:55:36
问题 I have prefered given answer of stackoverflow question Like button will not fire edge.create or edge.remove . But I am getting following error when see in developer tool console in crome browser "Uncaught ReferenceError: FB is not defined fb.php:20 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." code is as

Facebook SDK Upgrade to OAuth - PHP and Javascript

不问归期 提交于 2019-12-10 10:43:16
问题 I am trying to upgrade our PHP implementation of Facebook SDK for login according to http://developers.facebook.com/blog/post/503/. The changes explained seem easy enough, change session references to user. However there was one small piece missing, the 'next' url param has been replaced by 'redirect_uri'. I ended up with infinite redirects until I found and changed my 'next' url param. Now, for the Javascript SDK, I noticed the only difference between our current FB.init and the FB.init

phonegap facebook plugin

落花浮王杯 提交于 2019-12-10 10:42:42
问题 I'm doing a project using phonegap 2.4 and the latest facebook plugin https://github.com/phonegap/phonegap-facebook-plugin my problem is with posting to the user wall feed, I'm able to authenticate the user, get all the proper events for that, etc. but when I'm try to post to a feed (I'm doing the ask for read first then write permissions sequence due a new api inside ios6 and have the publish permission for the user and also I have setup my facebook account on settings, ah and also I I'm

Facebook registration page - Invalid 'client_id' when not logged into Facebook

假如想象 提交于 2019-12-10 10:36:28
问题 I have made a Facebook registration form that works with custom fields and functions as I expect, EXCEPT when the user is not logged into facebook when they first visit the form. In this situation the form does not render on screen and the following error appears: Unable to load the registration form for this ID. You may have previously blocked this app on Facebook. Go to your Facebook privacy settings to unblock this app. (Error: Invalid 'client_id'.) Now I know already that this has been

Facebook login onClick - Javascript

本秂侑毒 提交于 2019-12-10 10:25:23
问题 I have this code on my website. The facebook login dialog is being shown when my page has loaded and not when the user has click on an anchor tag. <script> // Additional JS functions here window.fbAsyncInit = function() { FB.init({ appId : 'xxxxxxxxxxxxxx', // App ID channelUrl : '//192.168.1.127/test/channel.html', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); // Additional init

Request to promote iOS App in Facebook via Marketing API

我是研究僧i 提交于 2019-12-10 04:24:37
问题 I have the facebook application with approved ads_read, manage_pages ads_management, business_management and Ads Management Standard Access permissions . I can create Ad campaign , ad set and can upload asset to Facebook via Facebook Marketing API. I create ad set with such parameters: { name: 'adset_name', campaign_id: '<campaign_id>', lifetime_spend_cap: 11000, promoted_object: { application_id: '<fb_app_id>', object_store_url: 'https://itunes.apple.com/app/<my_app>', page_id: '<page_id>',