Category Archives: Web

Posting to FB pages from web application

This is the code: $appId = ‘YOUR APP ID’; $secret = ‘YOUR SECRET’; $returnurl = ‘http://www.yoursite.com’; $permissions = ‘manage_pages, publish_stream, offline_access’; $fb = new Facebook(array(‘appId’=>$appId, ‘secret’=>$secret)); $fbuser = $fb->getUser(); if($fbuser){ $page_id = “YOUR PAGE ID”; $page_access_token = “GET PAGE TOKEN ID”; $result = $fb->api(“/me/accounts”); // loop trough all your pages and find the right one […]

Shortening URL with Goo.gl and PHP

// This is the URL you want to shorten $longUrl = ‘http://www.mysite.com/’; // Get API key from : http://code.google.com/apis/console/ $apiKey = ‘MyAPIKey’; $postData = array(‘longUrl’ => $longUrl, ‘key’ => $apiKey); $jsonData = json_encode($postData); $curlObj = curl_init(); curl_setopt($curlObj, CURLOPT_URL, ‘https://www.googleapis.com/urlshortener/v1/url’); curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curlObj, CURLOPT_HEADER, 0); curl_setopt($curlObj, CURLOPT_HTTPHEADER, array(‘Content-type:application/json’)); curl_setopt($curlObj, CURLOPT_POST, 1); curl_setopt($curlObj, […]

7 online tools to start with for a new website

Google Structured Data Testing Tools http://www.google.com/webmasters/tools/richsnippets Facebook Debugger https://developers.facebook.com/tools/debug Facebook Comments Box https://developers.facebook.com/docs/reference/plugins/comments/ Facebook Like Box https://developers.facebook.com/docs/reference/plugins/like-box/ Google+ Web Share https://developers.google.com/+/web/share/ Google+ Badge https://developers.google.com/+/web/badge/ Facebook Badge https://www.facebook.com/badges/

Adding structured data to your content

My latest project www.rumahlelong.ecom.my is another never ending experiment baby. This time I am using Events schema to have my website listed in search engine together with the auction events that are going to happen. According to Google, this will help visitors to visit the best page that they are looking for. I have to […]

How to use Google+ picture as your web favicon?

Do this: <link rel=”shortcut icon” type=”image/jpeg” href=”https://plus.google.com/s2/photos/profile/[your google+ id]?sz=16″/> example: <link rel=”shortcut icon” type=”image/jpeg” href=”https://plus.google.com/s2/photos/profile/123456789?sz=16″/> Put this line between <head> and </head> of your web page. For wordpress, find it in header.php file (in theme editor).

Gambar profile dalam keputusan carian Google

Kawan saya Fendi ada bertanya tentang cara bagaimana nak keluarkan gambar profile beliau dalam laman search result oleh Google. Ini di panggil Google Authorship. Senang saja. Dalam beberapa steps dah boleh buat. 1. Buka akaun Google+. 2. Pastikan link profile anda, contoh: https://plus.google.com/[nombor profile]?rel=author jadi sekiranya nombor profile anda adalah 009988, maka link profile anda […]

My first microdata looks good

So i just tried this microdata things for my jomstay.com project. I made the homestay view page to return product info, offer, geo-location, address and ratings. Now the microdata test tool display exactly the way I want it to be, where the offer name and price displayed on search result page, try it here. I […]