Skip to main content

Posts

Showing posts with the label facebook-graph-api

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

Facebook authentication error - The operation couldn’t be completed

I have an option in my game for users to post an achievement to their wall. If they are logged in, i.e. their token is still active, it works fine. However, if they need to renew their token, the app exits and the Facebook authentication page loads for a second before returning to the app (they only need to click OK on the authentication page if they have actively logged out, otherwise it happens automatically). The problem is that if this happens, when the game returns, the request fails. But since they're now logged in, if they were to press the 'share to wall' button a second time, it works fine. The error message output by the failed request it: DIDLOGIN 2012-02-21 12:01:33.502[18153:15803] Response received 2012-02-21 12:01:33.502[18153:15803] Request did load raw response 2012-02-21 12:01:33.502[18153:15803] Request failed, error: Error Domain=facebookErrDomain Code=10000 "The operation couldn’t be completed. (facebookErrDomain error 10000.)" UserInfo=0x

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)

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

The json encode did not return response after calling the function of fb post to wall

I have a link which posted data to another page vote.php through jquery. When I click on that link, it return the state according to the condition. If that user posted the vote before then it displayed the "already voted" other wise "Your vote posted". All was working fine. I am using the facebook post to wall sdk. Now when I call the fb_publish_on_wall function from the vote.php, the message successfully posted to my fb wall but it did not return the state of the vote like "Your vote posted". What is the problem. When I comment out that line where I am calling the fb_publish_on_wall function then It works fine. I think the jquery did not get response from vote.php after calling the fb_publish_on_wall function. How will I fix this? UPDATED: Here is the fb_publish_on_wall function function fb_publish_on_wall($message,$link,$picture,$name,$description,$user_facebook2) { $message = str_replace(array('<br />', '<

php file_get_contents return always FALSE on https://graph.facebook.com/oauth/access_token? request

Since some weeks the facebook connection to my application doesn't work. My dialog url is this one : $dialogUrl = "https://www.facebook.com/dialog/oauth?client_id=".$my_facebook_app_id."&redirect_uri=".urlencode($my_return_url)."&state=".$my_state."&scope=read_stream,offline_access,publish_stream"; Connection dialog accept my connection and return to $my_return_url with ?state=XXX&code=YYY When I call the file_get_contents() method on this url with $code corresponding to the code in query string : $tokenurl = "https://graph.facebook.com/oauth/access_token?client_id=".$my_facebook_app_id."&redirect_uri=".urlencode($my_return_url)."&client_secret=".$facebook_app_secret."&code=".$code; I have always a FALSE result ! A few month ago it was returning the access_token, but now it always return false on my website. Note than if I load the $tokenUrl in a navigator