2010年3月21日 星期日

Face Book Happy Farmer analyer pt2

Step(3) 分析封包的Data. 首先Login FaceBook, 看有沒有回傳所要的KeyWords. 底下是我們登入 FaceBook 之後回傳的 Key. 裡面有API ID, Session time..... FaceBook Login 原理似乎跟Google 很像. 登入server後,回傳Author ID,利用這個ID做驗證 可參考 http://funningboy.blogspot.com/2010/02/facebook-login.html 下面是login 之後的 KeyWords 'fb_sig' => 'ae193e4b29ec463b007c361d76e8ab59', 'fb_sig_cookie_sig' => '464b7a78b27ce2c972cc7d2706b58204', 'fb_sig_time' => '1269412560.3995', 'fb_sig_iframe_key' => 'xxxxxxxx', 'fb_sig_expires' => '1269417600', 'fb_sig_api_key' => 'xxxxxxxxxxx', 'fb_sig_session_key' => '2.mQZTxp_jEsSSleEDweSIWA__.3600.1269417600-100000063194415', 'act' => 'flash', 'fb_sig_app_id' => '82716374139', 'fb_sig_ss' => 'Qay4KMXuZQymKSqjbCbdcw__', 'fb_sig_ext_perms' => 'auto_publish_recent_activity', 'fb_sig_added' => '1', 'fb_sig_in_new_facebook' => '1', 'fb_sig_locale' => 'zh_TW', 'fb_sig_profile_update_time' => '1248347962', 'fb_sig_user' => 'xxxxxxxxxxxx', 'fb_sig_in_iframe' => '1', 'firstPlay' => '0' Step(4) Load Farm Land 利用這些KeyWords 依序填入我們要的欄位,傳送給Server,載入農場訊息 .

底下為Flash 的Variable. version: "2.1", firstPlay: "0", uid: "xxxxxxxxxxx", sig_user: "xxxxxxxxxx", sig_session_key: "2.mQZTxp_jEsSSleEDweSIWA__.3600.1269417600-100000063194415", sig_api_key: "xxxxxxxxxx", host: "http://img.harvest.6waves.com/farmgame_tw/static/swf_2_1/", web_base: "http://fbtwgw.farm.elex-tech.us/new_2_1_1/", database: "http://img.harvest.6waves.com/farmgame_tw/static/swf_2_1/database/v0321/item.xml?4", sig_time: "1269412560.3995", mod: "facebook_tw", farmuid:"xxxxxxx", secretid: "xxxxxxx", sig_ss:"Qay4KMXuZQymKSqjbCbdcw__", sig_photo_upload:"0", locale:"zh-tw", appurl:"http://apps.facebook.com/farmgame_tw/", ga_account:"UA-11729502-8", invitefriendsURL:"http://apps.facebook.com/farmgame_tw/index.php?mod=friends", //loadingPath:"http://img.harvest.6waves.com/farmgame_tw/static/swf_2_1/", ga_path:http://img.harvest.6waves.com/farmgame_tw/static/swf2/tongji/library.swf

Sample version 1 功能: 登入FaceBook, 載入農場資訊 Export 2 Local host 請更改 my $email = 'xxxx@gmail.com'; my $pass = 'xxxx'; 執行後會產生 test.html. 點入 test.html 就會裝載 開心農場到 Local 端 執行結果 如上圖 Code Download http://sites.google.com/site/funningboy/perl_code/farmer.pl?attredirects=0&d=1

沒有留言:

張貼留言