Showing posts with label Facebook. Show all posts
Showing posts with label Facebook. Show all posts
0
[postlink]https://iamdaowner.blogspot.com/2012/07/how-can-i-create-me-facebook-button-on.html[/postlink]

That's an interesting question, and generally my answer would be "no" because Facebookhas put a lot of effort into creating its own universe, generally one that's not easily reached from the rest of the Internet at large.
However, a colleague (thanks Trent Urbanski) gave me a little tip on how to reverse engineer just this sort of thing so let me share it with you so you too can create a nice "let's connect on Facebook" button for your blog or Web site...
The first thing you need to do is figure out your numeric account ID on Facebook.
The fastest way I know to get this information is to click on "Profile" on the top menu of your Facebook home page:


facebook navbar top left profile

Now scroll down a bit and you'll see your "Friends" box:


facebook profile friends count

Turns out that the link that shows you how many friends you have includes your Facebook account ID number, as you can see here:


facebook profile friends show url

You can simply copy that link with a Cmd-Click (or Right-Click) and paste it into an edit buffer to extract the numeric value. Mine account ID is 500501552 as you can see.
Now here's the hacking part: the link you want to create looks like this:
http://www.facebook.com/addfriend.php?id=yourID
For me, for example, it'd be:
http://www.facebook.com/addfriend.php?id=500501552
To make it into a button, simply wrap it in some rudimentary HTML:
<form action="http://www.facebook.com/addfriend.php"><input type="hidden" name="id" value="yanyancute13" /><input type="submit" value="Connect with me on Facebook!" /></form>
That code looks like this in action:
Tweak and modify to your hearts content, and enjoy!

HOW CAN I CREATE AN "ADD ME" FACEBOOK BUTTON ON MY SITE?

1
[postlink]https://iamdaowner.blogspot.com/2012/07/add-google-1-button-in-facebook-post.html[/postlink]
Hello Friends Today i am going to share you How to add Google +1 Button in a Facebook post it will allow you to recommend your favorite sites to your friends. You can Add this Button in your Facebook Profile beside of Facebook Like Button
Your Friends are able to like G+1 Your Favorite post in Facebook 
To Add Google +1 Button in Facebook post in your Facebook Post you need Google Chrome
 

TO Add Google +1 Button in Facebook Follow below the Steps.
 


2- Click on Add to CHROME on the Header you can see Below sample Image

3- This is a Google Chrome Extension and Its Name is +OneFB

4- Install it


5- Now your are ready to Google Plus1 to your Facebook post

Add Google +1 Button In Facebook Post

0
[postlink]https://iamdaowner.blogspot.com/2012/07/how-to-get-free-unlimited-facebook-likes.html[/postlink]

Hello Friends today i am going to share you Simple Trick for Unlimited Facebook Likes it you can use to Fake unlimited likes to your web page.

This Trick Won't Work For Facebook Fan Pages
This Trick work with webpage that include the facebook like button example you can sample buttons Below,



Follow the simple Steps

1- Login to your Facebook account

If you follow the steps as described, it shouldn’t get you any troubles.


2- To work this you need to have alteast 1 Genuine facebook likes

   So gohead and like your webpage

3- Copy your Webpage url, and paste it in the status bar

Now, you don’t want to raise a red flag, therefore before publishing the post, make it so only you could see the status update.

To do that, choose the “Only Me” option:





Also, make sure that the link preview box appears. For example:


and Not


4- Comment On It
Comment on Status updated that you posted 
Copy the same posted url and comment the sample URL its now automatically show the link preview,
Which is awesome for us (Each comment has counted as a Likes )
 Repeat this 4-5 times (not more, you don’t want to get blocked)

5- Now your Can Deleted The Post

   This step is optional 
   Great thing is that after deleting your post in facebook you facebook likes will remain
   After you delete the post, simply repeat the steps 3,4 and 5 and enjoy the Likes 



Thank to www.wizims.com  


Check This DEMO Video How It's Works


How To Get Free Unlimited Facebook Likes

0
[postlink]https://iamdaowner.blogspot.com/2012/07/facebook-smileys-emoticons-new-codes.html[/postlink]
We all use facebook accounts but still alot of us are unware of how to use smileys in chat.Some of us just think how the other person have sent a smiley.Well it is very simple to send smileys in facebook chat.You have to just enter a code and it will automatically convert into a smiley.I am providing here a complete list of smiley codes that can be used on facebook.Even if you already use or know some of the codes even then you will find this list very useful becuase you will find a lot of new codes

How to use this on Facebook-

Just Copy this code and paste in your chat box than click on Enter and your emoticon will be displayed.


[[f9.laugh]]
[[f9.sad]]
[[f9.angry]]
[[f9.sleepy]]
[[f9.shock]]
[[f9.kiss]]
[[f9.inlove]]
[[f9.pizza]]
[[f9.coffee]]
[[f9.rain]]
[[f9.bomb]]
[[f9.sun]]
[[f9.heart]]
[[f9.heartbreak]]
[[f9.doctor]]
[[f9.ghost]]
[[f9.brb]]
[[f9.wine]]
[[f9.gift]]
[[f9.adore]]
[[f9.angel]]
[[f9.baloons]]
[[f9.bowl]]
[[f9.cake]]
[[f9.callme]]
[[f9.clap]]
[[f9.confused]]
[[f9.curllip]]
[[f9.devilface]]
[[f9.lying]]
[[f9.rofl]]
[[f9.billiard]]
[[f9.cakepiece]]
[[f9.rosedown]]
[[f9.shutmouth]]
[[f9.shy]]
[[f9.silly]]
[[f9.tongue1]]
[[f9.fastfood]]
[[f9.ring]]
[[f9.plate]]
[[f9.candle]]
[[f9.party]]
Trying this its working........
Enjoy Guys! and don't forget to post your comments.

FACEBOOK SMILEYS / EMOTICONS NEW CODES

0
[postlink]https://iamdaowner.blogspot.com/2012/06/floating-facebook-likebox-for-blogs.html[/postlink]

Add Floating Likebox To Blogger

  1. Go To Blogger > Design > PageElements
  2. Click on "Add a Gadget"
  3. Choose HTML/JavaScript Widget
  4. Paste the following code inside it,
<script type="text/javascript"> 
//<!-- 
$(document).ready(function() {$(".w2bslikebox").hover(function() {$(this).stop().animate({right: "0"}, "medium");}, function() {$(this).stop().animate({right: "-250"}, "medium");}, 500);}); 
//--> 
</script> 
<style type="text/css"> 
.w2bslikebox{background: url("https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJnxMiqhU8SQsH__T6OwIkDPX2ffOB8hCA9gVxzsRq4aiWbfFClTiqYo0LM7xsflj17b_QogZ3_GwnGYLzTZ1f-CZgPQLSVTViB2UtPc5U3iZzm63o_M4LKnZax7-gNExA91OHOg9mFRfY/s150/w2b_facebookbadge.pn") no-repeat scroll left center transparent !important;display: block;float: right;height: 270px;padding: 0 5px 0 46px;width: 245px;z-index: 99999;position:fixed;right:-250px;top:20%;} 
.w2bslikebox div{border:none;position:relative;display:block;} 
.w2bslikebox span{bottom: 12px;font: 8px "lucida grande",tahoma,verdana,arial,sans-serif;position: absolute;right: 6px;text-align: right;z-index: 99999;} 
.w2bslikebox span a{color: #808080;text-decoration:none;} 
.w2bslikebox span a:hover{text-decoration:underline;} 
</style><div class="w2bslikebox" style=""><div>
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FNet-PublicLabblogspotcom%2F326506680732670%23%21%2Fpages%2FNet-PublicLabblogspotcom%2F326506680732670&amp;width=292&amp;height=290&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&amp;header=true&amp;appId=344867528898439" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:292px; height:290px;" allowTransparency="true"></iframe><span>Widget by:<a href="http://net-publiclab.blogspot.com/2012/06/floating-facebook-likebox-for-blogs.html ">Internet Online Help</a></span></div></div>

http://www.facebook.com/pages/Net-PublicLabblogspotcom/326506680732670
http://www.Facebook.com/Blogger-Tricks/981736126312983612
If you have not yet created a Facebook Username to brand your Fan Page then create it in seconds by clicking this link Once your create a username then replace netppubliclab with your newly created username
    6.  Save your widget
    7.  Now go To Design > Edit HTML
    8. Search for <head> and just below it paste the following JQuery code, (You can ignore this step if Jquery Link is already added in your template)
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js' type='text/javascript'/>
9.  Save your template and you are all done!
Visit your Blogs to see it floating at the right side of your webpage. I hope this widget helps you in increasing the number of your Facebook Readers. The widget code was created by Internet Online Help

Floating Facebook LikeBox For Blogs

0
[postlink]https://iamdaowner.blogspot.com/2012/06/display-facebook-photos-to-your-website.html[/postlink]Hi there! Today we're going to do a code that:

1. Gets photo albums and photos of a facebook fan page (using Facebook PHP SDK andFQL).
2. Display these photos to a webpage (assuming it is your website.).
3. Use jQuery Lightbox to make awesome images presentation.

Display Facebook Photos To Your Website with FQL and jQuery Lightbox
Show your facebook photos to your website


This one is useful if you want your facebook pictures to be shown in your website in a synchronized way. Once you uploaded an image in your fan page, it will be seen automatically in your website too.

This technique has the following Advantages:

1. You save your server disk space.
2. You got instant photo manager (facebook photos)
3. You save bandwidth since the photos shown in your website are loaded from facebook's repository.
4. Please add your comment if you know other advantages.

Risks:

1. When facebook is down (Well, I never encounter facebook was down)
2. Facebook is not responsible if you lost your data. (Read section 15 of their terms)
3. Please add your comment if you know other disadvantages or risks.

   

1. Create an App. This will enable you to get your App ID and App Secret. They are needed to access facebook data.

2. Our index.php well have the following code.
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>The Code Of A Ninja Dummy Page Images</title>
    </head>
<body>
<div style='font-size: 16px; font-weight: bold; margin: 0 0 10px 0;'>
    This album is synchronized with this
    <a href='https://www.facebook.com/pages/COAN-Dummy-Page/221167777906963?sk=photos'>
        Dummy Page Album
    </a>
</div>
<?php
    //include the facebook PHP SDK
    require 'fb-sdk/src/facebook.php';

    $facebook = new Facebook(array(
      'appId'  => 'change_this_to_your_app_id',
      'secret' => 'change_this_to_your_app_secret',
      'cookie' => true// enable optional cookie support
    ));
   
    //defining action index
    isset( $_REQUEST['action'] ) ? $action = $_REQUEST['action'] : $action = "";
   
//if there's no action requested
if( $action == ''){
    echo "<p>COAN Dummy Page Albums</p>";
   
    //Do the FQL to select the albums of my Dummy page
    //The ID of my Dummy page is 221167777906963
    //which also specifies the owner of the album
    //To get the ID of the owner, just look at the URL
    //I got https://www.facebook.com/pages/COAN-Dummy-Page/221167777906963
    //In case you don't see it, browse one of its albums and 
    //get the number after the last dot
    //I got https://www.facebook.com/media/set/?set=a.221168737906867.68636.221167777906963

    $fql    =   "SELECT aid, cover_pid, name FROM album WHERE owner=221167777906963";
    $param  =   array(
     'method'    => 'fql.query',
     'query'     => $fql,
     'callback'  => ''
    );
    $fqlResult   =   $facebook->api($param);
    foreach( $fqlResult as $keys => $values ){

   
   //we will do another query
   //to get album cover
        $fql2    =   "select src from photo where pid = '" . $values['cover_pid'] . "'";
        $param2  =   array(
         'method'    => 'fql.query',
         'query'     => $fql2,
         'callback'  => ''
        );
        $fqlResult2   =   $facebook->api($param2);
        foreach( $fqlResult2 as $keys2 => $values2){
            $album_cover = $values2['src'];
        }
        echo "<div style='padding: 10px; width: 150px; height: 170px; float: left;'>";
        echo "<a href='index.php?action=list_pics&aid=" . $values['aid'] . "&name=" . $values['name'] . "'>";
            echo "<img src='$album_cover' border='1'>";
        echo "</a><br />";
        echo $values['name'];
        echo "</div>";
       
       
    }
}

//when the user clicked an album
//it will show or list all the pictures 
//on that album
if( $action == 'list_pics'){
    isset( $_GET['name'] ) ? $album_name = $_GET['name'] : $album_name = "";
   
    echo "<div><a href='index.php'>Back To Albums</a> | Album Name: <b>" . $album_name . "</b></div>";
    $fql    =   "SELECT pid, src, src_small, src_big, caption FROM photo WHERE aid = '" . $_REQUEST['aid'] ."'  ORDER BY created DESC";
    $param  =   array(
     'method'    => 'fql.query',
     'query'     => $fql,
     'callback'  => ''
    );
    $fqlResult   =   $facebook->api($param);
   
   //so that jQuery lightbox will pop up
   //once the image was clicked
    echo "<div id='gallery'>";
   
    foreach( $fqlResult as $keys => $values ){
       
        if( $values['caption'] == '' ){
            $caption = "";
        }else{
            $caption = $values['caption'];
        }  
       
        echo "<div style='padding: 10px; width: 150px; height: 170px; float: left;'>";
            echo "<a href=\"" . $values['src_big'] . "\" title=\"" . $caption . "\">";
            echo "<img src='" . $values['src'] . "' style='border: medium solid #ffffff;' />";
            echo "</a>";
        echo "</div>";
    }
   
    echo "</div>";
}
?>
   
   
    <!-- jQuery lightbox include script -->
   
        <script type="text/javascript" src="jQuery-lightbox/js/jquery.js"></script>
        <script type="text/javascript" src="jQuery-lightbox/js/jquery.lightbox-0.5.js"></script>
        <link rel="stylesheet" type="text/css" href="jQuery-lightbox/css/jquery.lightbox-0.5.css" media="screen" />
       
        <script type="text/javascript">
        $(function() {
            $('#gallery a').lightBox();
        });
        </script>
   
    <!-- END JLIGHTBOX -->
  </body>
</html>

There are lots of other album information that you can retrieve. Not only album information, but also other information visible on facebook. Just check the availabe tables that you can query on facebook. Facebook Query Language (FQL) is of great help too since we are already familiar with SQL. We don't have much to study. :)

That's it! :)

Display Facebook Photos To Your Website with FQL and jQuery Lightbox

0
[postlink]https://iamdaowner.blogspot.com/2012/06/how-to-unsubscribe-from-someone-on.html[/postlink]
Few days ago Facebook launched the subscribe feature for the Facebook ProfilesSubscribe features allows anyone to subscribe to public posts of any other user on Facebook, provided they have enabled the ‘Subscribe‘ on their profile.
Good thing about this new feature is that you need not to be friend with someone to see their public updates. When Facebook launched this feature, it was believed to be Facebook’s answer to Google+ Follow. Now available for every Facebook profile, even your friends have become your subscribers automatically and you have become theirs. If you start subscribing to hundreds of users than your News Feed might get filled with updates from the people you have subscribed to. It could also be possible that you might not want to receive updates from anyone then you can simply Unsubscribe from them on Facebook.

Why you might Unsubscribe from Someone on Facebook?

  1. News Feed jam packed with updates from user updates
  2. No longer interested in receiving updates from an user
If you plan to unsubscribe from someone due to jam packed news feed, than you might want to change the subscription settings and allow only few important updates from the user. We will discuss it below in ‘Managing Updates you are Subscribed To’.

How to Unsubscribe from Someone on Facebook

There are 2 ways by which you can unsubscribe from someone on Facebook i.e either directly from the post on news feed or by visiting their Profile/Timeline.
Unsubscribe directly from the post: When you see a post from someone you want to unsubscribe from, you can click on the post options button on the right corner of the post on your News Feed and click ‘Unsubscribe’.
unsubscribe on facebook via post

Unsubscribe from Someone Via their Profile: You can also unsubscribe from someone by visiting their Profile [Timeline] and then clicking on ‘Subscribed’ button and then click on ‘Unsubscribe’.
unsubscribe via timeline
After you’ve unsubscribed from someone, the Subscribe button on their profile will be enabled again and you can subscribe to them anytime in the future.

Managing Updates you are Subscribed To

Besides unsubscribing you can also manage the type of updates you receive from the user and can only get the important updates from the user. You can choose what kind of updates you want to get from the user. As shown in above image, here are the few options that can be managed to get selective updates.
  • Life Events
  • Status Updates
  • Photos
  • Games
  • Comments and Likes
  • Other Activity
  • Music and Video
You may select whatever updates you may like, however our Recommended settings for anyone you are not friends with, is to choose only Life Events & Status Updates. For your Friends you can let the updates settings as it is so that you can get to know everything that’s happening in your Friend’s life on Facebook.


Read more: http://www.survivalguide4idiots.com/how-to-unsubscribe-from-someone-on-facebook.html#ixzz1yx9k5hBu

How to Unsubscribe from Someone on Facebook

0
[postlink]https://iamdaowner.blogspot.com/2012/06/is-facebook-auto-subscribing-people-to.html[/postlink]
As you’ve probably heard by now, yesterday, among several other new features, Facebook launched the new and cool “Subscribe” option. This is great for people who have more than 5,000 friends or want to let people who aren’t their friends read what they post on Facebook. The obvious comparison is Twitter, where anyone can follow you and your Tweets (unless you’ve set your account to private) and they don’t need to request to follow you or be your friend. Up until now, the only way anyone could see your status updates in their Facebook news feed was to request to be a friend and for you to accept. Now, however, you have the option to add the “Subscribe” feature to your profile page and let anyone who subscribes read what you post.
Yesterday I activated the Subscribe button for my profile page and gained some subscribers right away but so far I haven’t subscribed to anyone myself. So, imagine my surprise this morning when I checked my Facebook news feed and saw a (1) next to “Subscriptions” in my tab links. Obviously I was curious to see who I’d subscribed to while I was apparently sleep walking last night so I clicked the link and found that for some reason, out of all the interesting people on Facebook I could have subscribed to, I had subscribed to Chad Hurley, the CEO of Delicious.
Now, I don’t have anything against Mr. Hurley and I’m sure he’s quite fascinating, but until this morning, I have never visited his Facebook profile page and I know for a fact I never Subscribed to him. So, how did this happen? The only conclusion I can make is that Facebook is auto subscribing us to people. I reported this on my profile this morning and heard from two people who say they had been auto subscribed to Robert Scoble and others to Mark Zuckerberg. Frankly, Mark Zuckerberg makes sense, sort of the way new members of MySpace automatically got Tom Anderson as their first friend, but Robert Scoble?
Twitter and Google+ both have “suggested followers” lists of popular and famous people which helps new members jump start their accounts, but has Facebook actually taken that concept to a new level and rather than just suggesting people to subscribe to, will be subscribing us automatically? It sure looks that way. Apparently their tactic of turning things on by default and expecting us to opt-out rather than giving us the choice and letting us opt-in — similar to the way anyone can add you to a group — is being applied to Subscriptions and we’ll suddenly start seeing updates from people we don’t know in our News Feeds and we’ll have to unsubscribe from the ones we don’t want to hear from.

Is Facebook Auto Subscribing People to Popular Profiles?

0
[postlink]https://iamdaowner.blogspot.com/2012/06/how-to-add-facebook-like-twitter-tweet.html[/postlink]
It’s very easy and fast how to add the prominent Social Networking Buttons such as Facebook Like Button, Twitter ‘Tweet’ Button, Google ‘Plus One’ and the new addition to the social networking community, the Pinterest ‘Pin it’ button inside every blog post in your WordPress blog. Simple implementation guides on how to add the buttons are scattered across the world wide web. You just need to copy few codes, tweak some of it and paste it directly wherever you want to display it inside your single.php file.
How To Add Facebook Like, Twitter Tweet, Google Plus One and Pinterest Pin IT Button in your Index File (Multiple Blog Posts) in WordPress
Unfortunately, this method is not appropriate in your Index.php file or in a page with multiple post. If you do this method, you’re button will just return the active url in your web browser. The supposedly task to share the right blog post or url will not be met.

With few experimentations, I got to unravel how those buttons work. It’s very simple actually. The WordPress tag <?php the_title(); ?><?php the_permalink(); ?> and the other common php codes in WordPress will do the task for you.

To start this tutorial, let’s get first the button codes of Facebook Like, Twitter Tweet, Google +1 and Pinterest Pin it:
For this tutorial, I will pick out the Vertical Count buttons shown at the image below. You may choose whatever design you want. It’s still the same method.
How To Add Facebook Like, Twitter Tweet, Google Plus One and Pinterest Pin It Buttons

HOW TO ADD FACEBOOK LIKE BUTTON IN YOUR INDEX.PHP FILE OR IN A PAGE WITH MULTIPLE BLOG POST.


Fill up the Step 1 – Get Like Button Code, in URL to Like field type in your website url (Example: http://bendaggers.com).
Add Facebook Like Button in your Index or in Multiple Blog Post
I chose not to activate the Send button, that’s why you see it unchecked.

Choose whatever layout, size, faces activated and others you want to display in your button. It really doesn’t matter. If your done with the configuration, just hit the Get Code button and select IFRAME:
Add Facebook Like Button in your Index or in Multiple Blog Post IFrame
Your generated code is something like this:
/**Facebook Like Button Code**/

<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.bendaggers.com&amp;send=false&amp;layout=box_count&amp;width=450&amp;show_faces=true&amp;action=like&amp;colorscheme=light&amp;font&amp;height=90&amp;appId=176463485768664" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:550px; height:90px;" allowTransparency="true"></iframe>

/**Facebook Like Button Code**/
Replace the http%3A%2F%2Fwww.bendaggers.com with <?php the_permalink(); ?>. Copy paste the tweaked Facebook Like Button Code in your Index.php where multiple blog posts can be found. Test it if it’s properly working and you’re done!

HOW TO ADD TWITTER TWEET BUTTON IN YOUR INDEX.PHP FILE OR IN A PAGE WITH MULTIPLE BLOG POST.


Go to the Twitter Button’s Resources page and scroll down until you reach the “Configuring using data attributes” (CTRL – F will help you to search and arrive in the right place). Copy the code displayed on that page.
/**Twitter Tweet Button Code**/

<a href="https://twitter.com/share" class="twitter-share-button" data-lang="en">Tweet</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

/**Twitter Tweet Button Code**/

Modify the code: From the 1st code add the codes below after “en”:
/**Twitter Tweet Button Code**/

data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-count="vertical">

/**Twitter Tweet Button Code**/
Your final code for Twitter Tweet Button will be like this:
/**Twitter Tweet Button Code**/

<a href="https://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-count="vertical">Tweet</a>

/**Twitter Tweet Button Code**/
Place the above code in the appropriate position of your blog. Test the button if it’s working and you’re done!

Two out of Four and we’re done!

HOW TO ADD GOOGLE PLUS ONE BUTTON IN YOUR INDEX.PHP FILE OR IN A PAGE WITH MULTIPLE BLOG POST.

Visit the Official page Google Plus One Button. Customize the button that fits your preference.
Add Google Plus One Button in your Index or in Multiple Blog Post - Buttons

From the generated code you just copied, modify the first code by adding the highlighted text below:
/**Google Plus One Button Code**/

<g:plusone annotation="inline" href=<?php the_permalink(); ?></g:plusone>

/**Google Plus One Button Code**/
Paste the above code in the appropriate place you prefer.

Place second code which is a javascript inside the <head> tag of your index.php file
/**Google Plus One Button Code**/

<!-- Place this render call where appropriate --><script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();</script>

/**Google Plus One Button Code**/


HOW TO ADD PINTEREST PIN IT BUTTON IN YOUR INDEX.PHP FILE OR IN A PAGE WITH MULTIPLE BLOG POST.



We’ve now arrived at the last button we’re implementing. Pin It button is very much different from the first three buttons we’ve just implemented. Adding the Pinterest Pin It Button in your Index file or in a page with multiple blog post requires the user to touch or add new function in the functions.php file.





To start this tutorial, we should get the Pinterest Pin It Button Code in their Official Pinterest Button page. Fill up the fields just like what the image shows below.





Add Pinterest Pin It Button in your Index or in Multiple Blog Post - Buttons


If you follow what’s in the image above, vour Pinterest Pin It code will be like this:

/**Pinterest Pin It Button Code**/

<a href="http://pinterest.com/pin/create/button/?url=***your%20website%20url%20here***&media=***your%20website%20image%20url%20here***&description=***your%20website%20blog%20post%20title%20here***" class="pin-it-button" count-layout="vertical"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>

<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>

/**Pinterest Pin It Button Code**/
Modify the code by replacing the following:

Change “***your website url here***” with <?php the_permalink() ?>
Change “***your website image url here***” with <?php echo grab_that_image() ?>
And finally, change “***your website blog post title here***”with <?php the_title(); ?> (you can also replace <?php the_title(); ?> to <?php the_excerpt(); ?> if you want to display the except of the blog post instead of the title).

After modifying the code, paste the entire code in the place where you want it to be displayed.

In my case, I placed the <script> code together with the first code or the <a> code.

The last thing to do is to add grab_that_image function in your functions.php file: Just copy and paste, no need for any modification.
function grab_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches [1] [0];
if(empty($first_img)){ //Defines a default image
$first_img = "/images/default.jpg";
}
return $first_img;
}
Once you’re done, you can now test the Pinterest Pin It Button If its properly working.

Hope you learned how to implement the four social networking buttons (Facebook ‘Like’ Button, Twitter ‘Tweet’ Button, Google ‘Plus One’ and Pinterest ‘Pin It’) and successfully implemented it in your WordPress website.

If you find any trouble, just hit me in the comments section. Thank you and have a good day!

How To Add Facebook Like, Twitter Tweet, Google Plus One and Pinterest Pin IT Button in your Index File (Multiple Blog Posts) in WordPress

Grab the widget  IWeb Gator
Powered by Blogger.

Click the Like Button Below To Receive all updates via Facebook

Powered By Blogger Tricks |

Popular Posts