facebook-javascript-sdk

Problem with FB.ui apprequest dialog

只谈情不闲聊 提交于 2019-12-12 03:01:38
问题 I am trying to send application invites from an Iframe application. I open the dialog like this. function sendRequestToOneRecipient(user_id) { FB.ui({method: 'apprequests', message: 'message', to: user_id, display: 'popup' }, requestCallback(user_id)); } When the dialog opens I get a ton of "Unsafe JavaScript attempt to access frame with URL from frame with URL" error messages. The send and cancel buttons just make the dialog go blank, but not close and it doesn't work. I don't know if it's

facebook og data not updating

有些话、适合烂在心里 提交于 2019-12-12 02:44:36
问题 I have created a facebook app with subscription. When the user opens the app, there is a button called "SUBSCRIBE". When it is clicked, the javascript function completePayment(), is called. The facebook popup with subscribe appears. However, there is a big problem. If I change the og:image URL and set the price to let's say 10.00 USD and the billing period to 1 month and I upload the file to the server and then I click on the SUBSCRIBE button, I can still see the subscription page saying 5.00

Is it possible to customize / change the description content of a fb-share button?

╄→尐↘猪︶ㄣ 提交于 2019-12-12 02:39:56
问题 This is my code, it's from Facebook, it's quite simple: <div class="fb-share-button" data-href="http://www.mysite.com/" data-type="button_count"></div> But when I click on the share button, I found that I can't control the description content of the website. Some other sites did but I don't know how they did it. Is it possible to change it? Thanks 回答1: Facebook Has complete instruction and the available properties you can add on The Open Graph protocol site The basic meta tags are <meta

Facebook share button is sharing my login page instead of current page URL, title, etc

自作多情 提交于 2019-12-12 02:29:53
问题 I have added facebook share button to my webpage using this code: <a name='fb_share' border="0">Share</a> <script type='text/javascript' src='jquery.js'> </script> <script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'> </script> The above code shares the current webpage properly but when I included a session check at the start of the webpage where I redirect the user to the login page if valid session doesn't exist the above code always shares the login page

control fb.login dialog image

蓝咒 提交于 2019-12-12 00:00:36
问题 I was wondering how can I control the image on the connect dialog? I get some random image from my main page (in very bad quality), and not the profile image of the facebook app. I've tried setting the og:image meta tag on the main page of my website but it wont use it. Any Ideas? 回答1: In your app settings, under „auth dialog”, edit the logo. 来源: https://stackoverflow.com/questions/11074504/control-fb-login-dialog-image

Append a Javascript variable to two HTML links

梦想与她 提交于 2019-12-11 20:04:28
问题 I have the following scripts: <script> window.onload = function setHref(){ var affglcid = <?php echo json_encode($kws); ?>; var oldLink=document.getElementById('link').href; document.getElementById('link').setAttribute('href', oldLink+affglcid); var oldLink1=document.getElementById('link2').href; document.getElementById('link2').setAttribute('href', oldLink1+affglcid); } </script> And: <a id="link" href="oursite.com/">Link</a> <a id="link2" href="othersite.com/">Link</a> First, it takes a PHP

Javascript not running on Facebook iframe

a 夏天 提交于 2019-12-11 19:39:58
问题 I have a django project which is intended for a facebook application. In the project, the invite friends module runs fine in localhost! But while it is loaded in facebook application, the javascript responsible for displaying the friends list doesn't work. Although the libraries are properly loaded. I don't know why it is so. May be some iframe problem. Here is the javascript code <script type="text/javascript"> window.fbAsyncInit = function() { FB.init({appId: '460948667348013', cookie: true

FB Comments Plugin - Detect comment on page

守給你的承諾、 提交于 2019-12-11 19:23:55
问题 How can I detect when a comment is made on my page with the Comments Plugin? I'm currently using the Facebook PHP SDK, reading the Facebook documentation it says I need the JS SDK, but it's not really clear on how you accomplish what I want to do. 回答1: I guess it's straight forward: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : 'YOUR_APP_ID', // App ID channelURL : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File status : true, // check login

how do I detect a cancelled permissions request when the user arrives at my facebook app already logged in?

空扰寡人 提交于 2019-12-11 19:22:07
问题 I've been testing the auth/login code for the javascript sdk and I've noticed that facebook only detects the cancelled permissions request when a user arrives at my app not logged into facebook, but if a user is already logged in to facebook and they cancel the same permissions request, FB.login doesn't return the "unknown" status the way it does under the first condition. $("button").click(function(){ FB.login(function(response) { /*when the user clicks the button but isn't logged in, fb

Facebook Button not showing up

喜欢而已 提交于 2019-12-11 18:53:43
问题 I've looked at the other post on here for issue's with Facebook like button not showing up and can't seem to figure out why in the world the Facebook like button I am trying to add is not showing up. I've followed the steps on the FB developer page but still not showing. Here is my code. Is there something wrong that I am not seeing or doing? <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d