GithubHelp home page GithubHelp logo

Comments (3)

shashank025 avatar shashank025 commented on July 1, 2024

This seems to fix it:

$ diff -u facebook.py.bak facebook.py
--- facebook.py.bak 2012-11-10 23:43:24.000000000 -0800
+++ facebook.py 2012-11-10 23:44:49.000000000 -0800
@@ -336,7 +336,7 @@
                 post_args["access_token"] = self.access_token
             else:
                 args["access_token"] = self.access_token
-        if self.api_key:
+        if hasattr(self, 'api_key') and self.api_key:
             if post_args is not None:
                 post_args["api_key"] = self.api_key
             else:

from facebook-sdk.

martey avatar martey commented on July 1, 2024

Hi @shashank025,

First, thank you for reporting this issue.

The api_request method is for accessing Facebook's old REST API. While your patch does get rid of the error, no other method of the GraphAPI object sets self.api_key, so I am leaning toward removing that entire code block.

One reason I have not yet is because the REST API has been officially deprecated for almost a year, so I suspect most (if not all) app developers have migrated to the Graph API (which is better supported by both Facebook and this library). I think it would make sense to remove the entire app_request method from the library.

Are you (or anyone else reading this) still using the REST API?

from facebook-sdk.

shashank025 avatar shashank025 commented on July 1, 2024

I am actually not using the REST API. Soon after reporting this, I just switched over to the Graph API. But yes, I'd like it if you simply removed that code block, which is kinda dead now. Thanks!

from facebook-sdk.

Related Issues (20)

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.