GithubHelp home page GithubHelp logo

Comments (7)

jpdias92 avatar jpdias92 commented on June 15, 2024 1

After some minor modifications, I was able to get this code functional again.

  • Regarding JaharshKotha's post, the answers is yes, in the current version, you are iterating with post but accessing "wish". I changed the "wish" occurrences with "post", this was easy as you would get a very explicit error.

  • Regarding the facebook changed API, I had to modify the params line with the following: "params = {'since': utc_bday, 'access_token': access_token, 'fields': 'id,message,from,name,type'}". Apparently, now you just get a couple fields by default and you must explicitly specify the fields you want to receive.

  • The like functionality is no longer supported by the API: https://developers.facebook.com/bugs/1754734484744033/

  • I also had a problem testing this code with only one post, when assigning next_url. As this was my first test, I don't know if this was happening in cases with multiple posts. Anyway, to solve that error, I added a try catch block when we assign next_url. I catch the exception KeyError and return "wishes".

Think that's it... Successfully tested right now.

from facebook-birthday-response.

JaharshKotha avatar JaharshKotha commented on June 15, 2024

I have a small doubt in what you have written :
if comment: reply = choice(message_set) print 'Replying %s to %s' % (reply, wish['from']) url = 'https://graph.facebook.com/%s/comments?access_token=%s' % (wish['id'], access_token) requests.post(url, data={'message': reply}, proxies=proxy_dict)

Isn't this supposed to be iterating over "post"

print 'Replying %s to %s' % (reply, post['from'])
url = 'https://graph.facebook.com/%s/comments?access_token=%s' % (post['id'], access_token)

Just wondering if this did work for you without the above change ?

from facebook-birthday-response.

rishirdua avatar rishirdua commented on June 15, 2024

Wrote it long time ago back in school.

Definitely worked for me as I used it on my birthday

from facebook-birthday-response.

JaharshKotha avatar JaharshKotha commented on June 15, 2024

Haha ,I was expecting this , I was hesitant to ask but just gave it a shot .

from facebook-birthday-response.

bc206 avatar bc206 commented on June 15, 2024

hey! how ur accessing the tokens i mean i went to the link u mentioned logged in and then checked in the boxes manage_pages and publish_pages, then the token generated gets expired every time..thanks

from facebook-birthday-response.

rishirdua avatar rishirdua commented on June 15, 2024

@Fernuts92 Awesome, do you want to send a Pull Request and fix this for everyone?

from facebook-birthday-response.

JaharshKotha avatar JaharshKotha commented on June 15, 2024

@rishirdua I have worked out my own code long back after I had issues with yours , would you like to test and pull it in ?
https://github.com/JaharshKotha/Fb-birthday-bot

from facebook-birthday-response.

Related Issues (5)

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.