Posts

How to retrieve posts from Facebook Page using Facebook Graph API and php

Here's a simple php script that will split out the latest 100 posts from a given Facebook Page. Note that you will need to modify the code at lines 1 and 2 by: generating your own access token either using the oAuth dialog or via Facebook Graph API Explorer . specifying the page id of the target Facebook Page Have fun trying it out! :) <? $access_token="&access_token=YOUR_ACCESS_TOKEN_HERE"; $pageid="THE_PAGE_ID"; $graph_query_url="https://graph.facebook.com/" . $pageid . "?fields=posts.limit(100)" . $access_token; $graph_query_result = @file_get_contents($graph_query_url); $graph_query_obj = json_decode($graph_query_result,true); foreach($graph_query_obj[posts][data] as $p) { echo $p[from][name] . "<br/>"; if ($p[story]) echo $p[story] . "<br/>"; if ($p[message]) echo $p[message] . "<br/>"; if ($p[picture]) echo "<img src='" . $p[p...

How to add Diggit, Technorati, Del.icio.us, Stumbleupon, Reddit and pInterest buttons to your Blogger posts

Image
Here's how you can add a row of social media sharing buttons all at one go :) Step 1 Locate the <data:post.body/> code in the HTML template. Step 2 Copy and paste the code below just after the  <data:post.body/> tag. <!--Digg--> <a expr:href='"http://digg.com/submit?phase=2&amp;url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'><img src="https://sites.google.com/site/mydesiowfamily/Home/diggit.png" border="0"/></a> <!--Technorati--> <a expr:href='"http://technorati.com/faves?add=" + data:post.url' target='_blank'><img src="https://sites.google.com/site/mydesiowfamily/Home/technorati.png" border="0"/></a> <!--Del.icio.us--> <a expr:href='"http://del.icio.us/post?url=" + data:post.url + "&amp;title=" + data:post.title' target='_blank'...

How to add pInterest button to Blogger posts

I got this easily done by referring to Bloggers Sentral's tutorial . Only two simple steps: Step 1 Locate the <data:post.body/> code in the HTML template. Step 2 Copy and paste the code below just after the  <data:post.body/> tag. You can change the "count-layout" attribute to either horizontal, vertical or none (no count) <!-- Pinterest Start --> <div id='pin-wrapper' style='margin:5px 10px 5px 0; text-align: left;'> <a class='pin-it-button' count-layout='horizontal' expr:href='&quot;http://pinterest.com/pin/create/button/?url=&quot; + data:post.url'>Pin It</a> <a href='javascript:void(run_pinmarklet())' style='margin-left:-93px; width:43px; height:20px; display:inline-block;'/> </div> <script src='http://assets.pinterest.com/js/pinit.js' type='text/javascript'/> <script type='text/javascript'> function run_pin...

How to add StumbleUpon button to Blogspot

Image
In this post, I will show you how you can add a Stumbleupon button to each of your Google Blogger posts. Step 1 First, visit the StumbleUpon website ( https://www.stumbleupon.com/dt/badges/create ) to decide which badge style you prefer   As I was preparing this tutorial, there were 6 different styles of badges for selection as the ones below. Style 1 Style 2 Style 3 Style 4 Style5 Style 6 Step 2 Log in your Blogger dashboard and click the "Template" tab.  Thereafter, click the "Edit HTML" button. Step 3 After you have completed Step 3, Blogger will show you the partial HTML codes.  Make sure you check the "Expand Widget Templates" to see the complete codes. Step 4 Next,  use the Find function of your browser to look for this snippet of code.  Move on to Step 6 once you have located this code. <data:post.body>   Step 5 Place your cursor after the <data:post.body> and paste the...

How to create an organizational chart in your webpage using Google Organization Chart Tools

Image
https://developers.google.com/chart/interactive/docs/gallery/orgchart While googling for some information on organizational charts of various companies, I came across this cool visualization tool on Google Developers. If you are comfortable with JavaScript and want a quick and easy way to churn out a simple organizational chart that displays on a webpage, this tool is quite useful. Organizational chart churned out using Google's Visualization OrgChart object To use it, follow these few steps Step 1: Include this tag in your <head> tag in your HTML file <script type = 'text/javascript' src = 'https://www.google.com/jsapi' ></script> Step 2: Load visualization package and set callback method when page loads In this case, the callback method is "drawChart". <script type = 'text/javascript' >       google . load ( 'visualization' , '1' , { packages :[ 'orgchart' ]});     ...

How to add a Facebook "Like" button to your Blogger posts

Image
This is a short tutorial with 7 steps that teaches you how to embed a Facebook "Like" button to each of your Blogger posts. If you completed the 7 steps successfully, you will be able to see a "Like" button that looks like the one below. Interested to know how? Its easy, so read on! A Facebook "Like" button at the end of a Blogger post Step 1 Log in your Blogger Account Go to Blogger Dashboard.  Click on your Blog Title. Navigate to Template tab. Step 2 Click on Edit HTML button Click Proceed button to view Template Editor. Step 3 Check  "Expand Widget Templates" Step 4 Type "Ctrl-F" to look for the keywords "<data:post.body/>" in the template Step 5 Once you have located the position of "<data:post.body>", refer to the screenshot above to add the code below at the correct position <br/>     <iframe allowTransparency='true' expr:src='...

AT commands

Image
This week, I spent a few days trying to write a program that can receive and send SMS using the D-LINK DWM-156  3.75G HSUPA USB Modem I bought from Challenger at $79.00. Tried out GSMComm and it is a great library, but sadly, the library is not compatible with my lousy D-LINK modem.  Yeah, quite unhappy with this modem.  Since I bought it a few days ago, its performance has been quite below on par; I often got a 'NO SIM CARD' message when my SIM card was evidently never removed from the adapter all along.  Also, when I tried to flash my firmware, the installation tool adamantly REFUSED to recognise my device. In desperation, I called the D-LINK technical support.  After spending nearly an hour with 4 different support staff, my conclusion is that the D-LINK hotline was just manned by some staff who would ask you for a few keywords that they would key in their knowledge base, and if those keywords were found in their search, they just repeat the instructions...