Sunday, October 30, 2011

Setting Up A Facebook App Update (Oct 2011)

Here we go:1) Go to http://developers.facebook.com/ and click on Apps as circled below: 2) If you are here the first time, you will be asked for permission.3) You may also be asked about your phone number to verify your fb account. Do it before the next step.4) You’ll see the following wizard if you are here the first time. If you’ve set up any other apps before, you’ll be shown a different...
Read More »

Friday, October 28, 2011

Facebook App Using OAuth 2.0 and Open Graph Profile

This is the path:http://www.facebook.com/apps/application.php?id=187586184649186&sk=wallNote: this is for educational purposes and the look and feel might not look professional.App Feature:- Convert your friends' contact info into csv file- You can configure particulars you like to add to the list (csv file)- Good for backing up your FB contacts- The csv file can be opened by spreadsheet software...
Read More »

Thursday, October 20, 2011

Javascript to Move the HTML Body Background Image (Shake Like Wave)

Call this wave_background() function and your background will shake like you are underwater. But before that, make sure you have a background image that can mirror to x or y axis. Otherwise, the shake will look ugly.<script>var xpos = 100;var wave_timer;var tmp_string;var ran_num;var ran_dir;function wave_background() { wave_timer=setInterval("move_background()",200);}function move_background() { ran_num = Math.floor(Math.random()*5); ran_dir = Math.floor(Math.random()*6); if (ran_dir...
Read More »

Monday, October 17, 2011

Add Action to Your Facebook App Before Submission for OAuth 2.0 Open Graph API

Please check out my latest update here:http://webtrick101.blogspot.com/2011/10/setting-up-facebook-app-update-oct-2011.html Some info may not be applicable any more. This latest update also covers the aggregations part in more detail.Many things have changed since the October 2011. With the Oauth 2.0, access_token is now a must. Even the hosting for the App, App's action and object are now needed...
Read More »

Monday, October 10, 2011

About Installing PHP on IIS 7

All tutorials I found online are for "x86 Thread Safe" version of PHP.If you install the "Non Thread Safe" version, you won't get the php-cgi.exe in your PHP directory.So far no one points this out yet.Just in case you need this in...
Read More »

Wednesday, October 5, 2011

About AJAX, JQUERY, JSON, Microsoft AJAX

Ever since facebook embraces AJAX, the popularity surged.Yahoo and Google started this game and it is good. Microsoft AJAX is having compatibility problems with browsers and JQuery took the center stage.I summarize the new trends as below so that it's easier to understand:AJAX - HTML direct connection to server without refreshing a pageJQuery - Advanced Javascript codes to manipulate CSS and AJAX...
Read More »

PHP fwrite/fputs Newline Problem in IIS7

The problem I encountered is that I couldn't write a newline to the file under PC environment.Then I tried this and it worked:fwrite($fh, "My Text...\r\n");Instead of just \n, I need to have the \r\n pair under PC environment. No such issue using PERL under PC. Wei...
Read More »

AJAX Using JQuery and PHP to Check Availability of User Name

Again, I compiled these codes from several sources and it's hard to give credit to all of them as some of them I only use several lines and some I only use the concept. Many I found are not fully working. That's why I want to show you the one that's working for me (I'm using PHP5 with Windows 7 via IIS7). Note: Especially the part JQUERY AJAX pass JSON data to PHP. I don't need to decode the data in PHP. If json_decode() is used, the data will be gone. I really don't know why most examples...
Read More »

Free Simple Javascript Password Strength Checker

These codes came from many sources until I forgot the origins. I just combine all the good stuffs I found from the net. Sorry if I use your codes somewhere and remind me to include your credit as I forgot the origin of it. The Javascript function: function checkpassword(pw) {var Score = 0; var Result = "weak"; if (pw.length>5 && pw.length<8) { Score = (Score+6); } else if (pw.length>7 && pw.length<16) { Score = (Score+12); } else if (pw.length>15)...
Read More »