Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactions in version 2.7 and above #382

Closed
subkrish opened this issue Aug 18, 2017 · 6 comments
Closed

Reactions in version 2.7 and above #382

subkrish opened this issue Aug 18, 2017 · 6 comments

Comments

@subkrish
Copy link

Version of the SDK being used

2.0.0

Expected Behavior

{
  "data": [
    {
      "id": "<id>",
      "story": "<story>",
      "created_time": "2017-08-12T01:32:25+0000",
      "reactions": {
        "data": [
        ],
        "summary": {
          "total_count": 11
        }
      }
    }
  ],
  "paging": {
    "previous": "",
    "next": ""
  }
}

Actual Behavior

facebook.GraphAPIError: (#12) Reactions read API requires version v2.6 or higher

Steps to Reproduce

The API version was set to 2.7 :
graph = facebook.GraphAPI(access_token, version = '2.7')

posts = graph.request('/me/posts?fields=id,story,created_time,reactions.type(LIKE).limit(0).summary(total_count)')
@martey
Copy link
Member

martey commented Aug 18, 2017

What is the value of graph.version?

@subkrish
Copy link
Author

The graph.version is 2.7

@martey
Copy link
Member

martey commented Aug 18, 2017

Hmm, I missed the fact that you were using the request method. See #284 (comment).

@subkrish
Copy link
Author

@martey If possible, please change the error message because it is very misleading from and enduser point of view.

@martey
Copy link
Member

martey commented Aug 18, 2017

The error message isn't misleading because you were not using version 2.7 when you used the request method. Irregardless, I don't work at Facebook, so I can't change their error messages.

I think documenting the fact that the request method (unlike other methods) does not add versioning automatically should solve this issue. If you disagree, please feel free to comment in #323.

@subkrish
Copy link
Author

@martey I feel this is good and would help devs know from the documentation that when request is used version 2.7 is not used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants