Tag Info

Hot answers tagged

9

Facebook now uses opengraph protocol. You can add images using : <meta property="og:image" content="http://YOUR_IMAGE_URL" /> Add this line to your page header. Alternatively you can use my plugin to do this automatically. It just does this job and no settings are needed. http://shailan.com/wordpress/plugins/facebook-meta-tags-plugin/


8

<meta property="og:image" content="http://alexchen.info/taiwantalk/wp-content/uploads/2011/03/cheating.png" /> Visit http://developers.facebook.com/docs/reference/plugins/like/ and see "Step 2 - Get Open Graph Tags" There's also a lot of WP plugins out there that can help you to generate Open Graph tags.


7

The image that is used for sharing is taken from a chunk of code in the header of your site that will look something like this: <link rel="image_src" href="path/to/theme/screenshot.png" /> Typically it links to the screenshot of your site in the theme. If you removed the code from the header of the file and on single.php put it inside the loop and ...


6

That really depends on how the video is embedded into the page. Facebook can only handle specific formats and if it sees something it doesn't expect, it defaults to a failsafe "show nothing" standard. If the embedded video is well-recognized standard (i.e. YouTube's default player) it should work just fine. If it's your own self-hosted video player, ...


6

Otto has some great plugins for facebook and twitter. The one is Simple Facebook Connect (Wordpress Plugin) the other is Simple Twitter Connect (Wordpress Plugin). I think you're looking for this functionality: Automatically Publish new posts to Facebook Profile or Fan Page and for Twitter: Auto-tweet new posts to an account. Both are offered by the ...


6

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 a non-hackish version. Put the following in ...


5

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 is unique to you ...


4

This is a bit of a multi-part question, so you're getting a multi-part answer. Getting the Facebook count can be done by making a request to https://graph.facebook.com/URL. This will return a json object which contains, among other things, the number of "shares". Working example which has 4 shares as of this writing: ...


4

You need to use the Facebook Open Graph Protocol. I'm not sure why the Accepted answer isn't one of the many OG: related answers (which I've voted up) but it is wrong. http://developers.facebook.com/docs/opengraph/ You can customize many things including title, image, description, category, last update etc... if you use Open Graph. If you use these other ...


4

To answer this one and point to the real problem: As the <head> HTML tag comes far before the actual loop, you'll need something else than the global $post. get_queried_object(); get_queried_object_id(); The plugin The code is tested and works. As you might want to keep this functionality when switching themes, I'd suggest wrapping it up in a ...


4

I've managed to find a solution to my problem. I solved it with three plugins Members User Role Editor Social Login The combination of these plugins allows you to who can log in, without telling them how to log in. More specifically, anyone will be able to log in with a social network, but they won't be able to see everything. With User Role Editor, you ...


4

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, add ...


3

Take a look at /plugins/wpbook/includes/publish_to_facebook.php. They only have one function that posts to FB. You should be able to cobble something together from their code. Just make sure if you write your own files to them in a separate folder in your plugins directory. Otherwise any updates to WPBook will overwrite your files. The whole PHP SDK is in ...


3

I've come across this same problem before... a few things you can do. In your website, make sure you have..... An appropriate image close to the top of the page, title and alt tag are relevant A "description" META tag this is a tag that occurs in the <head></head> of the page example: <meta name="description" content="enter your description ...


3

You're getting the error because the Facebook and All In One Event Calendar plugins are both declaring the fb_admin_dialog() function, but PHP only allows a function to be declared once. To fix the immediate problem, log in to your server with S/FTP and rename the wp-content/plugins/all-in-one-event-calendar directory to something like ...


3

WordPress plugins repository has plenty ... have you tried the Official Facebook plugin? I'd always recommend you search the plugin repository first and then come here and explain what plugins you have installed.


3

If it's only for Facebook purposes that you need it, you could add the following code to your header.php file (between <head> and </head>): <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/> Of course replace the URL in content="..." with your own image URL. A reference for all the Facebook meta tags is here: ...


3

Take a look at Sociology for WordPress: Twitter/Facebook Poster plugin. As said in description: Broadcast your posts to Twitter and Facebook fan pages directly from the WordPress post page. Automatically post to Twitter and Facebook fan pages when you publish your post. Checks for already-published status. Select which or both social networks to post to ...


3

Pretty sure the Facebook fan page RSS feed URL is like this: http://www.facebook.com/feeds/page.php?format=atom10&id=YOURFBFANPAGEID The fan page ID is the string of numbers at the end of the URL when viewing the page, for example, Jon Stewart's fan page id is 193859733506: http://www.facebook.com/pages/Jon-Stewart-for-President/193859733506 So you ...


3

In the source code I see two og:description meta tags. The first and correct one seems to be coming from your Yoast WordPress SEO Plugin. The other one is outside the plugin's block, so I guess it's defined elsewhere. Check your theme if it includes that meta tag. If not, check your other plugins. Disable them one by one to find the culprit.


3

I don't have the plugin to test this, but looking at the lines to hack, as pointed by @tf: if ( is_home() || is_front_page() ) { $enabled_features = get_option( sprintf( $option_name, 'home' ) ); } else if ( is_archive() ) { // all archives wrapped in one option // is_post_type_archive || is_date || is_author || is_category || is_tag || is_tax ...


3

First, this isn't a WordPress specific question, it's a Facebook question. Secondly, Facebook caches pages, they don't crawl them on every submission. If you have a URL that has already been submitted to Facebook before, then they will have already crawled it for the OG data once before, and saved it to their cache. If you later change the OG data, they ...


3

Go to Settings > Sharing in your dashboard Sroll down until the "Button Style" option. Choose "Official Buttons". The Facebook Share button has now changed into a Facebook Like Button. Save your changes, and you'll be good to go! If you want to add a Facebook Share button next to the Like button, you can use the "Add a new service" option: In "Service ...


3

Hi @Rikard: @user653 is correct, you can't do it in a text widget with PHP but you can do it in a text widget using JQuery/Javascript. Here's how. Starting with the Facebook Share Button HTML I assume you plan to use use the Facebook Share Button and thus will have HTML code in your widget that will look like this? <a name="fb_share"></a> ...


3

I just added this feature to the beta branch of Simple Facebook Connect. It pulls comments back from auto-published stories and integrates them into the normal comments stream. Features: Integrated with Auto-Publish. When you post, and it's auto-published to your Page or Profile, SFC notices and saves the resulting story IDs for later polling. Fast. Every ...


3

I haven't used Socialite before today, so I did a quick install to see if I could reproduce the problem and ... wow ... The system is definitely broken. Facebook requires you to partially host your application on your own server. You set up some integration so you can use its API, but most of the work actually happens off-site. With other ...


3

You should add the list of comments within the comments.php file the following code: <iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(post_permalink() . '#comment-' . comment_ID()); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" ...


3

You can accomplish that with: a regular instal of WordPress but with a lot of work and hacking around to get it where you want. a multisite install of WordPress that would make it a bit easier but still a lot of work and customization. a fairly easy case with BuddyPress. Basically it just installing BuddyPress ,some plugins and configuring it a bit not ...


3

The easy way to automate the publishing of your WordPress posts to your Facebook fan page is to use Facebook's built in Notes application. You will need your sites feed link which is usually http://example.com/feed. Go to your fan page and click the edit page link then go to applications and under "Notes" click "go to app" at the bottom left hand side of ...


3

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 ...



Only top voted, non community-wiki answers of a minimum length are eligible