kcvinu

Facebook API tutorial

5 posts in this topic

Hi there,

I need to make a script to check the facebook notification.In  a facebook group, sombody posts in non-Engish. So i ineed to check the notifications and if they are about English posts, then the script will exit. But if they are about non-english posts, then this script will delete that notifiactions from list. Is it possible ? Can i get a Facebook API for this ?


My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites



Are you asking someone to write you a facebook api?

You might try out oDesk.com, freelancer.com, or something similar if so.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Hi 

SmOke_N , No.. I mean can i get a facbook api tutorial to work with AutoIt. After all, programming is my hobby. So i won't expect anybody to write code for me. I need to learn the secrets of programming. If it is not possible for a hobbyist like me, then i will forget it. But if it is possible, then i would like to give a try. 

My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites

I'm sure the api's are web based.  I have never looked for them nor have I bothered validating.

If you can find a dll based api, I'm sure it can be converted to be utilized quite easily with AutoIt.

Other than that, if they're all web based, then you might have to look really hard at the winhttp.au3 udf.

1 person likes this

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Hi, Thank you 

SmOke_N

My Contributions

UDF Link Viewer   --- A tool to visit the links of some most important UDFs 

 Includer_2  ----- A tool to type the #include statement automatically 

 Digits To Date  ----- date from 3 integer values

PrintList ----- prints arrays into console for testing.

 Alert  ------ An alternative for MsgBox 

 MousePosition ------- A simple tooltip display of mouse position

GRM Helper -------- A littile tool to help writing code with GUIRegisterMsg function

Access_UDF  -------- An UDF for working with access database files. (.*accdb only)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Similar Content

    • FengHuangWuShen
      By FengHuangWuShen
      So I was playing with INet and downloading files and made a simple video downloader, or it can even be used for any file really.
      Just follow the reference section in INet_Settings.ini , and then run the script.
       
      Main Script #include <INet.au3> #include <InetConstants.au3> #include <WinAPIFiles.au3> #include <Array.au3> #include <String.au3> OnAutoItExitRegister('INET_CLOSE') $GET_URL = _INetGetSource(IniRead(@ScriptDir & '\Inet_Settings.ini', 'Request', 'Url', Default)) $STRING_START = IniRead(@ScriptDir & '\Inet_Settings.ini', 'Data', 'Start', Default) $STRING_END = IniRead(@ScriptDir & '\Inet_Settings.ini', 'Data', 'End', Default) $GET_STRING = _StringBetween ($GET_URL, $STRING_START, $STRING_END) $VIDEO_URL = _ArrayToString($GET_STRING) $VIDEO = _URIDecode($VIDEO_URL) If StringLen($VIDEO) > 0 Then Local $VIDEO_DIR = (@ScriptDir & '\' & Random(1, 65535) & '.mp4') Local $DOWNLOAD_VIDEO = InetGet($VIDEO, $VIDEO_DIR, $INET_FORCERELOAD, $INET_DOWNLOADBACKGROUND) Do Sleep(IniRead(@ScriptDir & '\Inet_Settings.ini', 'Settings', 'Delay', Default)) Until InetGetInfo($DOWNLOAD_VIDEO, $INET_DOWNLOADCOMPLETE) InetClose($DOWNLOAD_VIDEO) Else MsgBox(0, 'DEBUG', "Video doesn't exist") EndIf Func INET_CLOSE() InetClose($DOWNLOAD_VIDEO) EndFunc Func _URIEncode($sData) ; Prog@ndy Local $aData = StringSplit(BinaryToString(StringToBinary($sData,4),1),"") Local $nChar $sData="" For $i = 1 To $aData[0] ; ConsoleWrite($aData[$i] & @CRLF) $nChar = Asc($aData[$i]) Switch $nChar Case 45, 46, 48 To 57, 65 To 90, 95, 97 To 122, 126 $sData &= $aData[$i] Case 32 $sData &= "+" Case Else $sData &= "%" & Hex($nChar,2) EndSwitch Next Return $sData EndFunc Func _URIDecode($sData) ; Prog@ndy Local $aData = StringSplit(StringReplace($sData,"+"," ",0,1),"%") $sData = "" For $i = 2 To $aData[0] $aData[1] &= Chr(Dec(StringLeft($aData[$i],2))) & StringTrimLeft($aData[$i],2) Next Return BinaryToString(StringToBinary($aData[1],1),4) EndFunc  
      INet_Settings.ini  URL - The target URL of the video you're trying to grab Data - This is the starting string, and ending string reference to look for the download URL itself. Settings - Only setting here currently, is the delay in which to wait for the file to download ### Reference for Start and End points for various websites [Request] Url = https://www.facebook.com/lindseystirlingmusic/videos/1527732263925622/ [Data] Start = hd_src_no_ratelimit:" End = " [Settings] Delay = 250 ################################################################################################### Instagram : https://www.instagram.com/p/Video ID Or : https://www.instagram.com/p/Video ID/?taken-by=User ID Start = video:secure_url" content=" End = " Facebook : https://www.facebook.com/User ID/videos/Video ID/ Or : Right click on the video and copy URL Start = hd_src_no_ratelimit:" End = " Start = sd_src_no_ratelimit:" End = " ###################################################################################################  
      Credits to : https://www.autoitscript.com/forum/profile/31965-progandy/  for the URL Encode and Decode.
    • avidovi
      By avidovi
      Hello Friends,
      I need your advise automating Facebook search project.
      I need to enter a string in a search input box, the inspect element shows me this code:
      <input name="query" class="inputtext" aria-required="true" aria-label="Search" required="1" type="text" maxlength="100" placeholder="Search this group" value="" autocomplete="off"> How to treat it? as a form? as an IE object?
      Really appreciating your help.

    • akira2891
      By akira2891
      Hi, im trying to make a small facebook messenger, but normally that i have problem since im here
      How to get all friend and chat with them ? over TCP or UDP ?
      And now window is not hidden but in future will be and process too.
      Im not so good in explaining things but here is code
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIListBox.au3> #include <IE.au3> Global $window = _IECreate('https://www.facebook.com/', 0, 0, 1), $Form1, $login, $email, $password, $stayLogged Local $oWbn = _IEGetObjById($window, "pagelet_welcome_box") If IsObj($oWbn) = 0 Then ;~ MsgBox(0, '', 'not logged') $Form1 = GUICreate("Facebook messenger", 359, 210, 338, 218) GUICtrlCreateGroup("", 10, 8, 337, 137) GUICtrlSetFont(-1, 10, 800, 0, "Calibri") GUICtrlCreateLabel("Email :", 64, 36, 40, 19) $email = GUICtrlCreateInput("", 107, 32, 217, 23) GUICtrlCreateLabel("Password :", 41, 73, 63, 19) $password = GUICtrlCreateInput("", 107, 70, 217, 23, BitOR($GUI_SS_DEFAULT_INPUT,$ES_PASSWORD)) $stayLogged = GUICtrlCreateCheckbox("Stay logged", 107, 104, 97, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $login = GUICtrlCreateButton("Login", 10, 156, 337, 41) GUICtrlSetFont(-1, 12, 800, 0, "Calibri") GUISetState(@SW_SHOW) Else GUIDelete($Form1) ; if already logged in show other form ;~ MsgBox(0, '', 'logged in') $Form2 = GUICreate("Facebook Chat", 448, 466, 299, 146) $friendlist = GUICtrlCreateList("", 16, 16, 417, 266) $chatwindow = GUICtrlCreateList("", 16, 296, 417, 97) $text = GUICtrlCreateInput("", 16, 392, 417, 21) $sendBtn = GUICtrlCreateButton("Send", 360, 424, 75, 25) $logout = GUICtrlCreateButton("Logout", 16, 424, 75, 25) GUISetState(@SW_SHOW) EndIf While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $login _checkLogin() Case $sendBtn _sendMsg() EndSwitch WEnd ; check login Func _checkLogin() If IsObj($oWbn) = 0 Then ; if not logged in ; check if empty fields If GUICtrlRead($email) == '' Or GUICtrlRead($password) == '' Then MsgBox(64, 'Info', 'Please enter email and password') Else #cs - opens hidden internet explorer window - opens facebook page - get ID's form, email, password, remember me, and submit button - set values from GUI - submit form #ce $formID = _IEGetObjById($window, 'login_form') $emailID = _IEGetObjById($window, 'email') $passID = _IEGetObjById($window, 'pass') $rememberID = _IEGetObjById($window, 'persist_box') $loginBtnID = _IEGetObjById($window, 'u_0_v') _IEFormElementSetValue($emailID, GUICtrlRead($email)) ; set email _IEFormElementSetValue($passID, GuictrlRead($password)) ; set password ; check for stay logged checkbox If GUICtrlRead($stayLogged) = $GUI_CHECKED Then _IEFormElementCheckBoxSelect($formID, 'persistent', '', 1, 'byIndex') Sleep(1000) EndIf _IEFormSubmit($formID) ; submit form EndIf ;=> login form EndIf ;=> if not logged in EndFunc ;=> check login ; send message Func _sendMsg() GUICtrlSetData($chatwindow, GUICtrlRead($text)) EndFunc