Lutfi widget!
Powered by Blogger.

Thursday 14 May 2015

Script facebook otomatis ngucapin ulang tahun

Hello sobat facebookers, di kesempatan malam ini sambil menonton bola aku mau share Script facebook otomatis ngucapin ulang tahun

 Ni. copy aja langsung file .bash nya.. sekian terimakasih :D







#!/bin/bash

SESUK=$(date --date=tomorrow +%m/%d)
#pakai server amrik lebih 22 jam setting di cronjob
#Enter your access token below within quotations
ACCESS_TOKEN="tokenmu"

#Get the names and UIDs of your unfortunate friends born on a day like today
curl "https://api.facebook.com/method/fql.query?
access_token=$ACCESS_TOKEN&query=SELECT%20first_name,
uid%20from%20user%20where%20uid%20in%20(SELECT%20uid2%20from%20friend
%20where%20uid1=me())AND%20substr
(birthday_date,0,5)%20==%20'$SESUK'" > /home/usermu/listbday.xml

names=`sed -n -e 's/.*\(.*\)<\/first_name>.*/\1/p' listbday.xml`
ids=`sed -n -e 's/.*\(.*\)<\/uid>.*/\1/p' listbday.xml`

F_ARRAY=( `echo ${names}` )
U_ARRAY=( `echo ${ids}` )

#Wish each of them with the same old boring message
for (( i = 0 ; i < ${#U_ARRAY[@]} ; i++ ))
do
curl 'https://graph.facebook.com/${U_ARRAY[$i]}'
curl -F 'access_token='$ACCESS_TOKEN'' \
    -F 'message=HªpPŸ ϐîя̅†нϑαў '${F_ARRAY[$i]}' ,ωϊsн ϋ ωёƦё ƍϊ√ёϞ all †нё вёs† ºƒ ωёɑĽ†н, ¢ɑƦёёƦ, ƒ ɑ м ϊ Ľ ў, ɑϞϑ all ўºϋƦ нºƿёs ¢ºмё †Ʀϋё, αιι τнε вεsτ īη ευεячτнϊηg..мαч Gσd вιзss u αιωαчs◦°◦ºº☆' \
    https://graph.facebook.com/${U_ARRAY[$i]}/feed >> /home/usermu/bdaylog.txt

#Let you know the progress
echo "Ucapan ${F_ARRAY[$i]}" >> /home/usermu/bdaylog.txt
done

echo "Sukses on $(date)" >> /home/usermu/bdaylog.txt

Ditulis Oleh : Moded Central Apps // 03:04
Kategori:

0 comments:

Post a Comment

Berkomentarlah dengan baik dan sopan dan sesuai judul artikel blog