Use Facebook PHP SDK from WPBook

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 … Read more

Show Social Sharing Buttons And Facebook Comments In Lightbox Modal Dialog (Image Overlay)?

You can show Facebook and Pinterest sharing tools on the Nextgen lightbox with this tool: http://sharemygallery.com You want a facebook comment box. Unfortunately, this doesn’t do that. This plugin puts Facebook and Pinterest sharing buttons at the bottom of the image browser. It may help you if you just want to get people stared sharing … Read more

Can’t access site after plugin activation

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 all-in-one-event-calendar-temp; that will deactivate it … Read more

How do I set a featured image for the homepage? [closed]

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: http://developers.facebook.com/docs/opengraphprotocol/

Website Preview Graphic for WordPress Site

The accepted answer over on StackOverflow looks to be the best way to do this. You’ll want to get into your header.php file to make these changes. https://stackoverflow.com/questions/6693499/how-can-i-set-a-website-image-that-will-show-as-preview-on-facebook Now if the image should change from post to post, I would probably write something using JQUERY to change the value of the meta tag on the … Read more

I want to run a script only once on a ‘thank you’ page

You can use order post meta to check order already there or not. try below code. let me know if this helps you. $order_id = $order->get_id(); $fbpixel = get_post_meta($order_id, ‘fbpixel-‘.$order->get_order_number(),true); if ( $order->get_subtotal() > 0 && ( empty( $fbpixel ) ) ) : update_post_meta($order_id, ‘fbpixel-‘.$order->get_order_number(),1); ?> <script> fbq(‘track’, ‘Purchase’, {currency: “AUD”, value: <?php echo ($order->get_total() … Read more

Correctly implementing the Facebook Like button

Yoast.com actually covered this quite recently… if ( is_singular() ) { global $post; if ( current_theme_supports(‘post-thumbnails’) && has_post_thumbnail( $post->ID ) ) { $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘thumbnail’, false); echo ‘<meta property=”og:image” content=”‘.$thumbnail[0].'” />’; } echo ‘<meta property=”og:title” content=”‘.get_the_title().'” />’; if ( get_the_excerpt() != ” ) echo ‘<meta property=”og:description” content=”‘.strip_tags( get_the_excerpt() ).'” />’; } … Read more

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