Monthly Archives: August 2012

How to display PDF file in browser?

Google Docs embeddable PDF viewer for your pdf file. You Don’t have to upload pdf in google doc. Plug-in problem solved!

Share

PHP – Add a custom application tab to facebook fan page ?

I spend a lot of time fingering out how to add “Custom Tab” in face-book fan page.
In fact this is very easy through PhpFacebook API.

You need to have “manage_pages” permission during user authorization.

This code will allow you to get control of all fab pages. This code is good for someone who is willing to add his tab/app to fab page. This is not good for normal user.

If you logged in successfully this code will show you all fan pages with Id and names etc.

Now it is time to post you can use Ajax or any way you like to post. PAGE_ID is your fan page ID/56789349409295678.

Now you can store PAGE_ID in database and when you will run this code then one tab will be added in your fan page.

Now your user can access whatever you add in your app.

use this code in your app page to correlate custom app for different user since you already have PAGE_ID stored in db

Using this method you can create multiuser fab page tab application and make some money by adding extra features!

Share

How to filter bad words?

You can use this simple function to filter bad words.

Please see attachment for mysql table of frequently used 458 bad words. http://www.phpmind.com/codedemo/php-bad-word-filter/bad_word.txt.zip
You can add more word easily as you know more!!

Share