facebook-graph-api,postRelated issues-Collection of common programming errors
tyler
facebook facebook-graph-api oauth facebook-oauth
We’ve run into a very strange case in which a particular Facebook account fails on a request to ‘https://graph.facebook.com/me/friends?access_token=XXX’ after successful login. After discovering this case in our app I verified that the exact same exception occurs when using the Facebook SDK sample – SessionLoginSample. After successfully logging into this particular account and granting privileges I return to the sample app and click the test link. This is the response:{“error”: {“message”: “
Bob Gilmore
facebook facebook-graph-api music
I’m working on an app to post music to the Facebook timeline, but having problems when I POST as recommended in the doc. I use OAuth 2 to successfully get the user’s Facebook ID and a valid session_token, but then, when I post this…POST https://graph.facebook.com/<user_id>/music.listens?song=<song’s URL>&expires_in=<seconds>&access_token=<session_token>I get the following error message back from Facebook:{\”error\”:{\”message\”:\”An unexpected error has occurre
Zak Khalique
facebook-graph-api
I’m having and issue sending app notifications using the Facebook API. I have a script that sends notifications to all users who have the app installed. About half are successful but about half fail.This is the PHP code that sends the notification $graphUrl = $key[‘id’] . “/notifications”; $params = array(“access_token” => $admintoken, “href” => $link,”template” => truncateStringAtWord($messageText, 170) );try {$response = $facebook->_graph($graphUrl, ‘POST’, $params); var_dump($res
blueberryfields
javascript jquery facebook-graph-api
The code below seems valid to me; do I really have a syntax error? Running this code in a console:$(“body”).append($(“<script />”, {html: ” window.fbAsyncInit = function() { “+ ” FB.init({“+ ” appId : ‘[valid_id]’, // App ID”+ ” status : true, // check login status”+ ” cookie : true, // enable cookies to allow the server to access the session”+ ” xfbml : true // parse XFBML”+ ” });”+ ” };”+ ” (function(d){“+ ” var js, id = ‘facebook-jssdk
Lix
facebook facebook-graph-api facebook-javascript-sdk
I have just put implemented Facebook connect on my web-site using the JavaScript SDK. Now I would like to proceed an fql query. So I have two questions : Is it possible using only JavaScript fql as “SELECT id, name FROM user where uid IN (SELECT uid1 FROM friends WHERE uid2=me())” ? Because when I tried some PHP SDK code using the facebook doc, $app_id = ‘MY_ID’; $app_secret = ‘MY_APP_SECRET’; $my_url = ‘POST_AUTH_URL’; $code = $_REQUEST[“code”];$_REQUEST[“code”] is quite normally not recopgnize
Kosmas Poulianos
facebook facebook-graph-api facebook-timeline
I’ve been trying to publish a read action for an article object to timeline, but I can’t get past this error: Message (#3502) Object at url…has og:type of ‘website’. The property ‘article’ requires an object of og:type ‘article’. Now I am confident my meta tags are correct and the og:type is ‘article’, not ‘website’.Here is the link to the article http://fb.idebate.eu/article2.php.Any help at all would be greatly apreciated.
CC.
facebook facebook-graph-api search facebook-fql
I’m trying to do a search using FQL. Using the Graph API, it works but there are more options using FQL. Using something like https://graph.facebook.com/search?q=myquery&access_token=mytokenit work fine.I’m looking for the equivalent in FQL.What query I must write in here https://api.facebook.com/method/fql.query?query=SELECT%20post_id%2C%20actor_id%2C%20target_id%2C%20message%20FROM%20stream&access_token=mytokenThe query above give me thatParser error: unexpected end of queryI want to s
marc_s
facebook-graph-api oauth
Can anyone tell me why https://graph.facebook.com/5550296508_10152201174321509/likes?offset=596&limit=400 query is failing with {“error”: {“message”: “An unexpected error has occurred. Please retry your request later.”,”type”: “OAuthException”,”code”: 2} }and https://graph.facebook.com/5550296508_10152201174321509/likes?offset=595&limit=400 is not (offset is 595, not 596 here)? The post has 2,752 likes, so I assume that this should be validUPDATE: Making the request from another networ
alexryabkov
facebook facebook-graph-api
I created a page under test user account and tried to post to this page via Open Graph API (“manage_pages” is set):https://graph.facebook.com/TEST_PAGE_ID/feed?message=Hello&access_token=TEST_USER_TOKENI get the following error:{“error”: {“message”: “An unexpected error has occurred. Please retry your request later.”,”type”: “OAuthException”,”code”: 2} }This works OK in two cases: If I post to the page using token of another test user (not page owner). If I use “real” user and “real” page.An
GNSPS
php facebook events facebook-graph-api
Using a PHP Facebook’s Graph API library I was a getting a error everytime I changed the location parameter on the POST request.Thinking this was a third party library’s problem I went to the Graph API Explorer and tried to edit the event with exactly the same permissions and the results were consistent: Facebook let’s me update the event (EVEN THE LOCATION gets updated) but it spits out a server error everytime instead of a simple “true” value!Error transcript:{“error”: {“message”: “An unexpect
JasCav
jquery post
I am trying to perform the following fadeIn/fadeOut action within the jQuery $.post function.$.post(‘Scenario/SaveScenario’, function (data) {$(‘<div class=”save-alert”>The current scenario has been saved.</div>’).insertAfter($(‘.buttons’)).fadeIn(‘slow’).animate({ opacity: 1.0 }, 2000).fadeOut(‘slow’, function () {$(this).remove();}); });However, this does not work and (apparently) nothing happens. (I put a breakpoint inside the function within Firebug and it is never reached.) The
Dave
php forms post get
I’m trying to migrate a website from one host to another. On the first host, when you submit a form, all of the form values are automatically stuck into variables with the input name (this is PHP). On the new host, these values are all null unless I do this:$data = $_GET[‘data’];Is there a PHP configuration setting that is causing this? If there isn’t, is there an easy way to loop through all of the $_GET variables and automatically assign their values to a variable with the same name?Thanks!
cwap
http post
Possible Duplicates:How should I choose between GET and POST methods in HTML forms?When do you use POST and when do you use GET? Obviously, you should. But apart from doing so to fulfil the HTTP protocol, are there any reasons to do so? Less overhead? Some kind of security thing?
Tony Abo
javascript ajax internet-explorer post
I have recently discovered that problems with intermittent failures for users running my application using Internet Explorer is due to a bug in Internet Explorer. The bug is in the HTTP stack, and should be affecting all applications using POST requests from IE. The result is a failure characterized by a request that seems to hang for about 5 minutes (depending on server type and configuration), then fail from the server end. The browser application will error out of the post request after the s
Vivin Paliath
jquery ajax post
I have a question about $.post() in jQuery. the general syntax is :jQuery.post( url, [ data ], [ success(data, textStatus, XMLHttpRequest) ], [ dataType ] );I’d be grateful if someone could shed light on what exactly data,textStatus are along with an example if possibleThanks!
gmaster
php string post
I am writing a program and have some code inside a string. This code is error free outside a string, however, when I put it inside a string, I get this error.Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in *directory and line number*The errors occur on $string = “if(isset($_POST[‘Submit’]))”;Thanks in advance.
Sam
php forms post fopen fwrite
I’m trying to create an installer, using a combination of fwrite and forms. Here’s my code:<?php $myFile = “db_config.php”; $fh = fopen($myFile, ‘w’) or die(“can’t open file”); fwrite($fh, “$host = ” . $_POST[‘host’] . “;\n $username = ” . $_POST[‘username’] . “;\n $password = ” . $_POST[‘password’] . “;\n $name = ” . $_POST[‘name’]”;” ;); fwrite($fh, ‘mysql_connect(“{$host}”, “{$db_username}”, “{$db_password}”)\n or die(mysql_error());\n mysql_select_db(“{$db_name}”)\n or die(mysql_e
Kacper Perschke
ruby rest post
I do constructed RestClient wrapperrequire ‘json’ require ‘rest_client’$url_common_part = ‘http://host:port/cgi-bin/cgi_script’class Grabberdef initialize@site = RestClient::Resource.new($url_common_part)enddef post ( path, params )site_and_path = @site[“#{path}”]payload = params.to_jsonputs “\n”, payloadresponse = site_and_path.post (payload,headers = {‘MY-HEADER’ => ‘MY-VALUE’,’content_type’ => ‘json’,’accept’ => ‘json’})return responseend endand get works well, but post gives error s
Maiku Mori
http post parameters
When I use Google Chrome to make an AJAX POST request I get extra empty parameter “_” on server-side.Here’s some background information:Web-server: Python Paste Back-end: Python 2.6/Pylons Browser: Google Chrome 3.0.195.1 JavaScript Library: Prototype 1.6.1 RC3For example simple:>>print sorted(request.POST.keys()) [‘_’,’my_parameter’]I’ve Googled and I found few posts in mailing lists mentioning the same problem but I couldn’t find an answer why is that happening. There were people reporti
avorum
python django post
I’m trying to pass some login data to a view in a Django app but I’m getting no POST data to the view. First the template with the login interface.<form method=”post” action=”login”> {% csrf_token %}Username<input type=”text” name=”username”><br />Password<input type=”password” name=”password”><br /><input type=”submit” value=”Login” /> </form>Next, I’m passing this to my login view which is defined as follows in my views.py, this is where the problem h
Web site is in building