Sunday, July 14, 2013
Monday, July 1, 2013
Facebook Account Manager with Google Scrip scriptDB
How it's look like?
Setting up your own scriptDB
- Login to your google account.
- Go to http://script.google.com/
- Create a New Project.
- Give it a title
My FB account manager scriptDB
or whatever. - Copy
the Codes
from https://script.google.com/d/ ... /edit?usp=sharing - Paste into your Project above.
- Save your Project.
- Run
function cekDB
for the first time toauthorize the script
before distributing the URL. [Run->cekDB
] - Set up your
Project Version
[File->Manage versions->Save new version->OK
] - Deploy your project as web app
[Publish->Deploy as web app
]
->Execute the app as:me
->Who has access to the app:Anyone, even anonymous
->Deploy - Copy the
Current web app URL
shown and save it for your self. - You may replace the
thisUri
ofaing variable
value with yours above. - Now you have
your own scriptDB URL
and your scriptDB is ready to Rock \m/.
Using The Account Manager Console
You may use our Online Console
at http://fb-accounts.blogspot.com/ or you may save the page as your own local htlm file or whatever, actually that did not make any difference at all :P.
This console is totally safe, no one will able to access your account list as long as they don't know what your scriptDB URL
is.
You may use multiple scriptDB URL
and the script will remember each of it as long as you don't close the console page.
For the sake of security reasons we don't save any cookies or etc. on the console page, that's why it'll better to keep the page open on your browser tab or you may pin the tab in chrome.
About the Access Token
Make sure that the access_token
has extended permissions
email
and user_birthday
. Check at http://developers.facebook.com/tools/debug.
If you're getting the access token from Multi Tools | AingCreations, you better use Facebook for Android application or BlackBerry Smartphones App.
But if you can't get the offline access
permission (&expires_in=0
) or at less a long lived
access token from them, you may use your own application and get the long-lived access token
from it at Get Long-Lived Access Token | AingCreations
Auto Update Status
- Function name:
updateStatus
- Description:
- Periodically update status of each user on scriptDB list with status from pages listed on
robot.pages
array. - Trigger Timer:
- If there're
6 accounts
on scriptDB list and the trigger set toevery 10 minutes
then each account will automatically update status every hour.6x10minutes=60minutes=1hour
Auto Post to Groups
- Function name:
postToGroups
- Description:
- Periodically post to group of each user on scriptDB list with status from pages listed on
robot.pages
array. - Trigger Timer:
- If there're
6 accounts
on scriptDB list and the trigger set toevery 10 minutes
then each account will automatically post to group every hour.6x10minutes=60minutes=1hour
Wall Groups Post Digger
- Function name:
postDigger
- Description:
- Periodically comment on one post at every 25 post per-page on a group wall of each user on scriptDB list with message
Hey
plus random emoji code listed on@[post.from.id:]
aing.emojis
array. - Trigger Timer:
- Set it to every minutes or every 5 minutes or just don't set the trigger.
Have a nice day! and remember, smoking is good for your inspirations \m/
Wednesday, June 12, 2013
Bikin Notif Pengunjung ala Facebook diBlog (versi Google Script)
Udah gak usah dijelasin lagi kali kayanya ya, noh tuh kan contonya (kalo masih) ada dipojok kiri bawah.
Dulu di Blog yang lama juga udah pernah dishare scriptnya kalo gak salah, tapi emang yang itu
DataBase untuk penyimpanan data pengunjung-nyamasih pake Feed dari Facebook Page, nah kalo yang sekarang udah dipindah pake ScriptDB-nya Google Script. |
Sebenernya kalo dibilang beda
juga gak jauh-jauh amat kayanya, antara nyimpen sama ngambil datanya juga tetep pake API, cuman emang kalo ScriptDB-nya Google Script gak butuh Access_token, tapi kalo soal privacy data sih tetep aja public open; semua orang bisa access read/write.
ganjelandari Blog Notif yang sekarang ini:
- Apakah ada/Berapa
limit penyimpanan
dari ScriptDB ini. - Masih suka kepentok masalah
Limit Eksekusi Script
, jadi kalo pengunjung blognya rame, butuh lebih dari satu ScriptDB. - Belum ketemu gimana caranya biar
write access
ke-ScriptDB hanya bisa dari satu subdomain saja.
ScriptDb
Saving Data
function saveToDB(){ var db=ScriptDb.getMyDb(); var whatToSave={ visitor:{ id:"4", name:"Zuck", page_title:"AingCreations", page_uri:"http://aingcreations-reborn.blogspot.com/", action:"viewed", browser:"Firefox 10", time:"2013-05-20T17:11:45+0000" } }; db.save(whatToSave); }
Collecting Data
function collectDB(){ var visitors=[]; var count=0; var limiting=5; var db=ScriptDb.getMyDb(); var whatToCollect={visitor:db.anyValue()}; var searchOnDB=db.query(whatToCollect); while(searchOnDB.hasNext()){ var fromDB=searchOnDB.next(); visitors.push(fromDB.visitor); count++; if(count==limiting){break} } var Lol="\nFound: "+visitors.length+" Visitors\n"+JSON.stringify(visitors,null," "); Logger.log(Lol); }
Modifying Data
function modifDB(){ var db=ScriptDb.getMyDb(); var whatToModify={visitor:{id:"4"}}; var modifPart={ partName:"time", partVal:"2013-06-10T00:00:00+0000" } var searchOnDB=db.query(whatToModify); while(searchOnDB.hasNext()){ var whatToSave=searchOnDB.next(); whatToSave.visitor[modifPart.partName]=modifPart.partVal; db.save(whatToSave); } }
Deleting Data
function dellDB(){ var db=ScriptDb.getMyDb(); var whatToDell={visitor:{id:"4"}}; var searchOnDB=db.query(whatToDell); while(searchOnDB.hasNext()){ db.remove(searchOnDB.next()); } }
ContentService
published as a web app, the special callback functions
doGet()
and doPost()
are invoked whenever a request is made to the script's URL. The ContentService can be used to return raw textual content. This allows you to write scripts that act as services, responding to GET and POST requests and serving data of various
mime-types.
Codes at Google Script
Publishing as a Web App
Testing
- No Parameters
- https://script.google.com/macros/s/ ... /exec
- Wrong Parameters
- https://script.google.com/macros/s/ ... /exec?naonnya=euy
- Missed Parameters
- https://script.google.com/macros/s/ ... /exec?simpan=euy&id=4
- Collecting Data
- https://script.google.com/macros/s/ ... /exec?ambil=euy
Getting visitor facebook ID
The important thing about this Blog Notif
is visitor facebook ID. We can get this ID by connecting our blog to facebook or better known as Facebook Connect.
I'm not writing yet
about this, but you may still learn it from http://developers.facebook.com/ or you may analyze this blog source script if you want :)
By knowing our visitor facebook ID, then we can fetch more information about our visitor from facebook, such as their profile photo, locale language, gender etc.
Tester HTML File
Sunday, June 2, 2013
Feed Cleaner ( this is how your posts or comments are deleted in our group :P )
Monday, May 27, 2013
Can't Get Access Token while using Chrome Browser
It seems to work just fine for now I guess :P