Skip to main content

Posts

Showing posts with the label facebook

fbDidLogin not called

So, I've been messing around with the Facebook iOS SDK for a bit and as of the latest version I can't get the fbDidLogin method to be called. The login process works fine, with Safari used on the simulator and the Facebook app being used when running it on a device. However, after logging in I get transferred back to my app (as I should be) but as the fbDidLogin method hasn't been called, nothing has changed. As far as my app is concerned I'm not logged in. The demo app that is bundled with the SDK works fine. So I'm obviously doing something wrong, but I have no idea how to check what. I triple-checked all the methods used in the demo app against my own and as far as I can see everything looks the same. Any thoughts or ideas on how to debug this? Or has anyone had similar problems?

Like button in iOS application

Does anybody know how to place Facebook "like" button into iOS application? I've tried the method described in this blog post . But I do not really like this method, because its ugly Login dialog. And, what is more important, it makes user login twice. For example, user wants post a message to his wall if he isn't logged in I call standard FBLoginDialog, after that user posted a message he may want push "like" button and he have to login again - it is really bad user experience. How to be? How can I give user "like" feature in my iOS app? Source: Tips4all

How can I make the Facebook Like button"s width automatically resize?

I'm implementing the Facebook Like Button , but I'm running into some trouble with the width. I'm using the JavaScript SDK implementation, not the direct iframe. According to the documentation, the default width is 450 . That's fine, and I understand that the width can be changed by way of the width attribute on the <fb:like> tag. However, my problem is that I really cannot specify a fixed width. Due to the nature of the button, the width is not constant in all states. For example, if no one has liked the page yet it displays "Be the first of your friends to like this"; if someone has, it displays "XXX people like this. Be the first of your friends"; and still if you have liked it, it displays "You like this" or "You and XXX people like this." In other words, there are many states of the button, none of which share a constant width. This wouldn't be much of a problem if it weren't for the fact that I want

How to detect when facebook"s FB.init is complete

The old JS SDK had a function called FB.ensureInit. The new SDK does not seem to have such function... how can I ensure that I do not make api calls until it is fully initiated? I include this in the top of every page: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '<?php echo $conf['fb']['appid']; ?>', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); FB.Canvas.setAutoResize(); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> Source: Tips4all

How to detect when facebook"s FB.init is complete

The old JS SDK had a function called FB.ensureInit. The new SDK does not seem to have such function... how can I ensure that I do not make api calls until it is fully initiated? I include this in the top of every page: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : '<?php echo $conf['fb']['appid']; ?>', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); FB.Canvas.setAutoResize(); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script> Source: Tips4all

Facebook connect with iPhone not working

I have set up two apps with Facebook Connect. The settings were exactly the same except from the App IDs, Bundle IDs, and on my app side, the Facebook Secret keys are different. The first app works perfectly. The second app doesn't. The error I kept getting is that "Sorry, the application you're using is misconfigured..." I tried to delete the second app on FB and set up new ones and it still doesn't work. For proof of no error in my code, I enter the App ID and Secret of the first app to the second one, and it actually runs. So does anyone know why? Is it because I could only have at any given point and time, one active Facebook app for one Facebook account? (Which is ridiculous.) To add, I am simply using ShareKit. There's no magic in what I did.

change the url in facebook comments code?

on my website I have more than 200 pages and I want to add facebook comments feature to my website. I ran to this problem is that I have to change the code (the url) for each page. I do not want to change the code for every page. If you can see the second piece of code contain Url goes here can I include a method like location.href so that it can use the current url of the page. can I do this ? I do not care if it is php, javascript, or anything ealse. Include the JavaScript SDK on your page once, ideally right after the opening <body> tag. <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/en_US/all.js#xfbml=1&appId=324524777119"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> Place the code for your plugin

app application request popup filter users

Is it possible to invite only girls to my app in FB.ui popup ? thank You for any suggestions, if not tneh maybe there is any other solution available ? User is in the app. There is invite friends button with jscode: $('#btnInvite').bind("click", function(){ FB.ui({method:'apprequests',title:'test',message:'test',data:'test'}); }) And then popup with friends appears to be selected. Is it possible to filter this list only to female users (app is dedicated for girls)

Running JQuery or Javascript on Facebook

I am trying to execute a simple bit of jQuery or JavaScript once logged in to my Facebook account. The end goal at this moment is to click on my custom feed once the element is visible, rather than having it default to the entire Facebook friend feed. On trying to code this using my Developer's Console in Chrome no JavaScript/jQuery seems to work at all. Even just a simple $('div'); returns null . Is it possible to run code on Facebook's page? What are they doing differently? I guess the end goal would be to click a div if the .val('give a waffle'); but just understanding why it has not worked until now would also be interesting. Any hints, tips or suggestions are more than welcome.

Does storing large sessions slow down response time and server

I am in the process of creating a Facebook App for my website which includes functionality that requires the users friends list. Retrieving the friends is no problem, what I am struggling to decide, is how to store them. Option 1 - Store the users in my MySQL database, I have opted not to go for this as my database will become very heavy, very quickly. In addition, I will need to create a table for each individual Facebook user! Option 2 - Store the Facebook friends array in a session which is updated every half an hour to ensure new friends are included. Ignore the fact that the session updates every half an hour, is it a bad idea to store, what can be a very large array, within a session? The website is likely to be receiving high volumes of traffic, and will therefore be storing a lot of these sessions. Although I am an experienced developer, I am not overly experienced with sessions in these circumstances. I would simply like to know whether or not this i

facebook iframe app; php sdk getUser() returns valid id on page one but not for any other page

I have a facebook iframe app which correctly logs in and authorizes the app, but getUser() only works on the first page. As soon as a user clicks a link to a new page within the iframe, getUser() returns 0. What's strange is that this same code works for another app... I do all the clicking I want and getUser() returns a valid ID. The app that doesn't work: https://apps.facebook.com/celestial_glory/ The one that does (same codebase): https://apps.facebook.com/uprisingstlouis/ Here's the code I am using: require_once ('fb/facebook.php'); // snip... set $app_id, $secret, and $canvas_page // first, try normal facebook getUser(). If that works, awesome. $facebook = new Facebook(array( 'appId' => $app_id, 'secret' => $secret, )); $signed_request = $_REQUEST['signed_request']; // Get User ID $user = $facebook->getUser(); if ($user != '0') return 'fb=' . $user; // works once // getUser() didn't work. Try

post status on facebook using scribe on android [closed]

I'm success to use scribe to tweet and retweet using scribe via my android appilcation using this code. Now, I want to post facebook status using this scribe, there is an example using scribe to access facebook from here . But I'm still confuse where I must place my string, that contain my status on program? And what is the url to post this status? If on twitter, I can put my string on this url: String tweet = URLEncoder.encode(message); String urlTweet = "http://api.twitter.com/1/statuses/update.json?status="+tweet; please somebody help me, I'm getting stuck in here. regard ahmal final OAuthService service = new ServiceBuilder() .provider(TwitterApi.class) .apiKey(consumerKey) .apiSecret(consumerSecret) .callback(callBack) .build(); final Token requestToken = service.getRequestToken(); final String authURL = service.getAuthorizationUrl(requestToken); final WebView webview = new WebView(this); webview.setWebViewClient(new Web