Facebook Comment Count

Final version of code used: function fb_comment_count($link = ‘link’) { global $post; $url=”https://graph.facebook.com/”; $posturl = get_permalink($post->ID); $url .= $posturl; $filecontent = wp_remote_retrieve_body(wp_remote_get($url, array(‘sslverify’=>false))); $json = json_decode($filecontent); $count = $json->comments; if ($count == 0 || !isset($count)) { $count = 0; } $comments = $count; if ($count == 1) { $comments .= ‘ Comment’; } elseif ($count … Read more

Facebook OAuth, WP_Http::request() vs wp_remote_request()

To answer my own question, when you use WP_Http, the transport used is selected, in this order, from this array: $request_order = array( ‘curl’, ‘streams’, ‘fsockopen’ ); If your PHP supports curl, WP_Http_Curl is used. Curl doesn’t support adding the body array parameters when the method is GET WP_Http_Streams and WP_Http_Fsockopen on the other hand, … Read more

Get FaceBook Friend Count [closed]

To get your friends as a JSON object from Facebook, you can use their Graph API. Easiest way is to visit this page: http://developers.facebook.com/docs/reference/api/user/ Scroll down until you find the Friends link in the “Connections” table. That link will give you a JSON object containing all your friends. Note that the URL on that page … Read more

Facebook comments box on front page

Fast ‘n’ Hacky The problem can be solved by changing line 319 in facebook.php to the following: if (is_home()) { This way, the front page is not treated as a home page but as a regular page, for which the facebook feature settings can be applied (and will be handled correctly). More Elegant/Complex Here is … Read more

If your blog was an app on Facebook

My number 1 feature would be to have the ability to use WordPress to manage a fan page. It would have to have the ability to use a WordPress page to create a Facebook page application tab. Published posts would auto publish to the Facebook wall and comments would sync between WordPress and Facebook.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)