{"id":2938,"date":"2014-03-10T23:56:57","date_gmt":"2014-03-10T23:56:57","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/10\/facebookcodeignitercodeigniter-urlrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-03-10T23:56:57","modified_gmt":"2014-03-10T23:56:57","slug":"facebookcodeignitercodeigniter-urlrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/10\/facebookcodeignitercodeigniter-urlrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"facebook,codeigniter,codeigniter-urlRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/092ca0e608bbc86258fe298e7e765e0e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPrashant<br \/>\nphp javascript jquery facebook<br \/>\nI have to call below function call to my php file&#8230;if any one have idea please help&#8230;.function update_hidden_input(saved_tokens, hidden_input) {var token_values = $.map(saved_tokens, function (el) {\/\/alert(el[settings.tokenValue]);return el[settings.tokenValue];});hidden_input.val(token_values.join(settings.tokenDelimiter));\/\/var frienduid =(token_values.join(settings.tokenDelimiter));\/\/alert(frienduid);}<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a368217db59917fe612fbfb79443211c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSuperDuck<br \/>\njavascript facebook facebook-like<br \/>\nI&#8217;m looking for a way to fire a JS action when a visitor &#8216;does&#8217; with the facebook &#8216;like&#8217; button. There is Event.subscribe(&#8216;edge.create&#8217;.., but it fires right after a visitor clicks the like button, giving them no chance to write a comment and &#8216;share&#8217; on their profile.I need an event which will be fired when someone closes the like box by using the &#8216;close&#8217; button, or by sharing the page with a comment using the related button, so I can redirect them to the appropriate page when they&#8217;re done.Using<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/51b355d6942327f86201227b6f8615c3?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1667307<br \/>\nfacebook<br \/>\nI am using the following code to delete a user :https:\/\/graph.facebook.com\/TEST_USER_ID?method=delete&amp;access_token=TEST_USER_ACCESS_TOKEN (OR) APP_ACCESS_TOKENHowever it keeps telling me:{&#8220;error&#8221;: {&#8220;message&#8221;: &#8220;An unexpected error has occurred. Please retry your request later.&#8221;,&#8221;type&#8221;: &#8220;OAuthException&#8221;,&#8221;code&#8221;: 2} }<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/597bb2c5b41852e7a3019a40d1ce7f0c?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nkk_nou<br \/>\nfacebook facebook-fql<br \/>\nI have a problem with my FQL query. I read all the related topic but I can&#8217;t find my error. My Facebook App has this permissions: email, user_birthday, user_likes, read_stream. Inside a function I want to get if a user likes my page, but my query returns no result! The same query has been tested in Graph API explorer and I get a result. This is the function:function getUserInfo(accessToken) {FB.api(&#8216;\/me&#8217;, function (response) {var user_id = response.id;var page_id = &#8220;40796308305&#8221;; \/\/page id for<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/graph.facebook.com\/100004836091910\/picture?type=large\" \/><br \/>\nHoogstudentengilde De Wesp<br \/>\nfacebook facebook-fql photo<br \/>\nI wrote a query, trying to all the comments, given on my albums. The query I use is the following :SELECT fromid, user_likes, text, time FROM comment WHERE object_id IN ( SELECT object_id FROM photoWHERE aid IN ( SELECT aid FROM album WHERE owner=me() ) )In my case, when I test it on the developers site, it just returns: {&#8220;data&#8221;: [] }So I figured my query wasn&#8217;t wrong because it returns no error so I asked a friend to try it and he did get all his comments on albums. The test page I used it t<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/17bc9309619d5a778d341e476bd574e1?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nSrini S<br \/>\nsql facebook union facebook-fql<br \/>\nCould you please anyone can show the UNION operation of two SELECT statements results in FQL. When i was trying to execute FQL query with UNION operation, I&#8217;m getting the following error error_msg=Parser error: unexpected &#8216;UNION&#8217; at position 171., error_code=601}. Thanks in Advance.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/28a7f88bdc3b36f5101ad8d0b12a2386?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nberyllium<br \/>\nfacebook api<br \/>\nI&#8217;m getting this, i didn&#8217;t modify nothing on facebook.php when I run my script the error apears.Parse error: parse error, unexpected T_CONST, expecting T_OLD_FUNCTIONor T_FUNCTION or T_VAR or &#8216;}&#8217; in\/home\/csargent\/public_html\/fanpages\/facebook\/facebook.php on line 26<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/5ae268c9a6193b97d3e08da193ac502e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser714965<br \/>\nfacebook<br \/>\nI am trying to authenticate my application using Facebook PHP SDK. It is working fine, but for some users it will show the following users{&#8220;error&#8221;: {&#8220;type&#8221;: &#8220;OAuthException&#8221;,&#8221;message&#8221;: &#8220;An unexpected error has occurred. Please retry your request later.&#8221;} }It is creating a access token. But still it shows the errors.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c90b5b5c4f93008e257f8ff40346b77e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nC\u00e9sar Bust\u00edos<br \/>\nfacebook metric<br \/>\nI am trying to retrieve metrics post_impressions_unique, post_consumptions or anything started with a post but Facebook always return empty array for me. Anyone know what is the problem here?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/51713a1e14ce6bad687f5a445126c437?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nJohn Kurlak<br \/>\njavascript facebook sdk connect<br \/>\nToday, all of my sites that use Facebook Connect are showing an error in the console from all.js:Uncaught SyntaxError: Unexpected token .Is this a Facebook problem or am I the only one experiencing it?<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/3e66b7e8c51104d4468189a7ce4b3067?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nShahed Hossain<br \/>\nphp xml codeigniter domdocument<br \/>\nIn my CodeIgniter 2.x project with PHP 5.3.x I use following function to render Dom Document as XML response. Every things are goes fine. But generated XML parsing failed due to some malformed unexpected text (non-whitespace text outside root element).function renderDOMAsXML(DOMDocument &amp;$dom, $format = true, $status = 200){$dom-&gt;formatOutput = $format;$controller = &amp;get_instance();$controller-&gt;output-&gt;set_status_header($status);$controller-&gt;output-&gt;set_header(&#8216;Co<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/OfzkQ.jpg?s=32&amp;g=1\" \/><br \/>\nChris Till<br \/>\ncodeigniter cron godaddy<br \/>\nI&#8217;m trying to run a cron job for a simple php script in codeigniter, hosted with GoDaddy.the script is a controller like so:http:\/\/my-domain.com\/facebook\/myapp\/cron\/select_winnersI have setup a cron with the create cron tool as so&#8230;.$HOME\/html\/facebook\/myapp\/index.php\/cron\/select_winnersWhen i run it in the browser it all works as intended. However as a cron it returns the following error:\/bin\/sh: -c: line 0: unexpected EOF while looking for matching `&#8221;&#8216;\/bin\/sh: -c: line 1: syntax error: unexpe<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/c16541fe40f554689ba5c96b55fc4cfb?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nAlex McCabe<br \/>\njquery codeigniter foreach modal-dialog<br \/>\nI am using CodeIgniter to display a list of items from the database. I want to delete an item based on it&#8217;s ID. This is not a problem and works fine without the modal box. My issue is that I am using a jQuery plugin called reveal (http:\/\/goo.gl\/3lzRN) to add a modal box to confirm deletion. This works for the first item in the list, but the others have the same ID as the first. &lt;a href=&#8221;pages\/&lt;?php echo $row-&gt;id; ?&gt;&#8221; class=&#8221;delete&#8221;&gt;&lt;i class=&#8221;icon-cancel&#8221;&gt;&lt;\/i&gt;&lt;span c<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/ywXUt.jpg?s=32&amp;g=1\" \/><br \/>\nzer02<br \/>\nphp javascript jquery json codeigniter<br \/>\nI am trying to implement an search function (auto complete) using jquery,jquery-ui in Codeigniter, but I am getting &#8220;JSON Parse unexpected Character error&#8221; when typing into the input field.When calling \/user\/search_userautocomplete\/test I do get back some values in JSON.(With warning : The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The char<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/i.stack.imgur.com\/MGhY2.png?s=32&amp;g=1\" \/><br \/>\nhakre<br \/>\nphp security .htaccess codeigniter<br \/>\nI have setup an htaccess rule (see below)RewriteRule ^images\/(.*) http:\/\/www.mysite.com [R=301,L]My intention is that any of the following links will be redirected to site.com the problem is the question mark character (?) as this causes an &#8216;Disallowed key characters&#8217; error in Codeigniter framework. I could modify the permitted characters in the config file but this is not recommended for security purposes.The links I aim to redirect looks like the following..http:\/\/www.site.com\/images\/flash\/mai<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/16c351c9fd6213877d815a5241686e31?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nluso<br \/>\ncodeigniter<br \/>\nI&#8217;m having an unexpected behavior with links to the same page in Codeigniter. Somewhere in the page is a tag.However, links such as&lt;a href=&#8221;#xx&#8221;&gt;&lt;\/a&gt;are not working. Even if I enter the URL manually: &#8220;path\/to\/page#xx&#8221; or &#8220;path\/to\/page\/#xx&#8221; it goes to the top of the page.Something to do with the fact that there are no filename in the URL? Any clue will be welcome.Thanks!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/91e9cea76c62e303f7b52e4d152625af?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKimberly Mullins<br \/>\nphp codeigniter error-handling<br \/>\nwhat is this error ?Parse error: syntax error, unexpected T_VAR in D:\\xampp\\htdocs\\mehdi\\application\\libraries\\phpass-0.1\\PasswordHash.php on line 32code:$iteration_count_log2 = $params[&#8216;phpass_hash_strength&#8217;];$portable_hashes = $params[&#8216;phpass_hash_portable&#8217;]; var $itoa64; \/\/line 32var $iteration_count_log2;var $portable_hashes;var $random_state;<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/353dea0597d18148c0ed8a83b7eb6ea8?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nfxuser<br \/>\nphp function codeigniter<br \/>\n. . . .public $counts_per_page = 15;public function getNames($user_id, $count = $this-&gt;counts_per_page){\/\/do stuff}. . . .I am getting an error on second parameter as it doesnt allow me to do this&#8230;Parse error: syntax error, unexpected T_VARIABLE inhow can i solve this?Thanks in advance.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/251254b22d6d5daedcdeb1ab53b35f67?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nKate Thompson<br \/>\nphp codeigniter<br \/>\ni have in following code error, what is cause? did is true following query?(how is true it?)$this-&gt;db-&gt;order_by(&#8220;id&#8221;, &#8220;desc&#8221;)-&gt;like(&#8216;name&#8217;, %$value_search%)-&gt;get(&#8216;ki_submits&#8217;); \/\/line 15error: Parse error: syntax error, unexpected &#8216;%&#8217; inD:\\xampp\\htdocs\\application\\models\\model_name.php online 15<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/9a7101fe3ba50e621e91ee1edf9d27bb?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nNyxynyx<br \/>\nphp codeigniter sendgrid<br \/>\nI am using the PHP library for Sendgrid (https:\/\/github.com\/sendgrid\/sendgrid-php). Following the instructions, I had to use this line of code:$mail = new SendGrid\\Mail();I get the error:Warning: Unexpected character in input: &#8216;\\&#8217; (ASCII=92) state=1 in \/home\/d\/public_html\/ac\/application\/controllers\/email.php on line 20Parse error: syntax error, unexpected T_STRING in \/home\/d\/public_html\/ac\/application\/controllers\/email.php on line 20Is there something wrong with using &#8216;\\&#8217;? Seems strange<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bd4c6e70550f032ef797007c86c3bcac?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nuser1851359<br \/>\ncodeigniter codeigniter-2 codeigniter-url codeigniter-routing codeigniter-form-helper<br \/>\nhere is a question that I am not able to find a way to do it. At the home view, I have a php section that will echo out if users input is just signed in when they submit form. But when I am doing this, it will give out a undefined error, because that controller is not yet executed. This is my home view. &lt;?php include(&#8216;header.php&#8217;); ?&gt; &lt;?php echo $sign_in_results;?&gt; &lt;?php include(&#8216;forms\/forms.php&#8217;); ?&gt; &lt;?php include(&#8216;footer.php&#8217;); ?&gt;This is my sign in controller, will ge<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/d116f371236f97e8ee1ed8ed118240db?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nMr. Sam<br \/>\nfacebook codeigniter codeigniter-url<br \/>\ni have http:\/\/www.idiotminds.com\/login-with-facebook-in-codeigniter\/ but i have error &gt; A PHP Error was encountered &gt; &gt; Severity: Notice &gt; &gt; Message: Use of undefined constant CURLOPT_IPRESOLVE &#8211; assumed &gt; &#8216;CURLOPT_IPRESOLVE&#8217; &gt; &gt; Filename: facebook\/base_facebook.phpand i fix CURLOPT_SSL_VERIFYPEER =&gt; false, but not fixedbut i have enable the php_curl**cURL support enabled cURL Information libcurl\/7.24.0 OpenSSL\/0.9.8b zlib\/1.2.3 libidn\/0.6.5**codepublic static $CURL_OP<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prashant php javascript jquery facebook I have to call below function call to my php file&#8230;if any one have idea please help&#8230;.function update_hidden_input(saved_tokens, hidden_input) {var token_values = $.map(saved_tokens, function (el) {\/\/alert(el[settings.tokenValue]);return el[settings.tokenValue];});hidden_input.val(token_values.join(settings.tokenDelimiter));\/\/var frienduid =(token_values.join(settings.tokenDelimiter));\/\/alert(frienduid);} SuperDuck javascript facebook facebook-like I&#8217;m looking for a way to fire a JS action when a visitor &#8216;does&#8217; with the facebook [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2938","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2938"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2938\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}