Giter VIP home page Giter VIP logo

fb_photo_friend_finder's Introduction

To use the script:

git clone https://github.com/bknarendra/fb_photo_friend_finder.git
cd fb_photo_friend_finder
bundle install

You need to get the FB access token to allow uploading temporary photos to FB. Use the Graph API Explorer to get a token that has the permissions publish_actions and user_photos. Copy and paste the access token in the script.

Next you need the FB cookies.

  • Open facebook.com in Chrome and login.
  • Then open Developer Tools and switch to Network Tab.
  • Reload the page.
  • Right click on any request which goes to facebook.com and select Copy as cURL option. It will copy that request as a cURL command.
  • Paste it in some editor. It will look something like this. curl 'https://www.facebook.com/photo.php?fbid=&set=' -H 'accept-encoding: gzip, deflate, sdch, br' -H 'accept-language: en-US,en;q=0.8' -H 'authority: www.facebook.com' -H 'cookie: cookies' --compressed
  • Copy the cookie block (everything in '' which has cookie written)
  • Paste that in the script and save.

To run the script.

ruby photo_friend_finder.rb "path to the photo"

fb_photo_friend_finder's People

Contributors

bknarendra avatar elsehow avatar

Stargazers

atharvagunjkar avatar Anirudh Ramasami avatar  avatar Chandrapal Badshah avatar Buu Pham avatar Felix  avatar MOZGIII avatar Alex Southan avatar Brian Roach avatar Hirokazu Hata avatar Ömer Saatcioglu avatar Viren Rajput avatar chardy avatar Lonnie King avatar Oscar Roa avatar  avatar Zhilong Zhang avatar Louis Lai avatar Tamás Tímár avatar Kevin Darlington avatar OGURA Daiki avatar DNX avatar Richard Kirk avatar Eric Clemmons avatar  avatar Paris Z avatar Stefan Danaita avatar Daan Nijkamp avatar Rothana Choun avatar colorbox avatar Glenn 'devalias' Grant avatar James Campbell avatar netop://ウエハ avatar Thanesh Rajandran avatar Adam avatar Hemratna Bhimani avatar Halil Emre ÖZEN avatar Gil Gonçalves avatar Michael Taylor Scheer avatar  avatar Andrei Popovici avatar Jonny Scholes avatar makuchaku avatar Markus Kohler avatar Eduard-Cristian Boloș avatar Richard Metzler avatar  avatar Aung Kyaw Phyo avatar bhargav avatar Sugavanesh B avatar João Pedro Netto avatar Nicholas Olds avatar theblackcat102 avatar James Hernandez avatar Nick Sarafa avatar Matias Insaurralde avatar Arturo Escartin avatar Umar Hansa avatar Gilad avatar Jordan Howlett avatar Marius-Constantin Melemciuc avatar  avatar William Wolf avatar yonatan miller avatar Cem Turan avatar  avatar ms avatar Cifro Nix avatar Sheikh Araf avatar Andrew Dunkman (he/him) avatar  avatar  avatar Bam Azizi avatar Tom Sella avatar Rogério Moreira avatar  avatar Baptiste Fontaine avatar Barney Gale avatar

Watchers

James Cloos avatar  avatar JUNO_OKYO avatar

fb_photo_friend_finder's Issues

faceboxSuggestion class not found

Hi Narendra,
Your project looking interesting but when I try to install nokogiri throw a version problem and me kinda strange ruby things.
I read your code and try on the browser your process but I didn't see any ".faceboxSuggestion" child element in ".fbPhotosPhotoTagboxBase.faceBox" I just add a sample output block, do you have any idea ?

Sample block :

<div class="fbPhotosPhotoTagboxBase faceBox" style="width: 8.5%;height: 11.333333333333%;left: 47.416666666667%;top: 9.3111111111111%;" data-recognizeduids="[]" data-faceboxid="10204125574809305" id="face:10204125574809305">
   <div class="borderTagBox">
      <div class="innerTagBox">
         <div class="ieContentFix">&nbsp;&nbsp;&nbsp;&nbsp;</div>
      </div>
   </div>
   <div class="tag" style="">
      <div class="tagPointer">
         <i class="tagArrow img sp_izBMGoEGKwM_2x sx_bb4b10"></i>
         <div class="tagName"></div>
      </div>
   </div>
</div>

Permissions error

Here's what I see when I run the script, after following instructions:

uploading file: downloaded-fb-photo.jpg
/Library/Ruby/Gems/2.0.0/gems/koala-2.3.0/lib/koala/api/graph_api.rb:529:in `block in graph_call': type: OAuthException, code: 200, message: (#200) Requires extended permission: publish_actions, x-fb-trace-id: GZqseFBJGKw [HTTP 403] (Koala::Facebook::ClientError)
    from /Library/Ruby/Gems/2.0.0/gems/koala-2.3.0/lib/koala/api.rb:80:in `api'
    from /Library/Ruby/Gems/2.0.0/gems/koala-2.3.0/lib/koala/api/graph_api.rb:527:in `graph_call'
    from /Library/Ruby/Gems/2.0.0/gems/koala-2.3.0/lib/koala/api/graph_api.rb:148:in `put_connections'
    from /Library/Ruby/Gems/2.0.0/gems/koala-2.3.0/lib/koala/api/graph_api.rb:236:in `put_picture'
    from photo_friend_finder.rb:18:in `<main>'

One place I think I may have gone wrong is in copying the cookie. I did it like this:

COOKIES = "cookie: datr=...0467F2CC"

Am I missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.