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

Like Post API gives error #10

Closed
harry225 opened this issue Oct 6, 2014 · 8 comments
Closed

Like Post API gives error #10

harry225 opened this issue Oct 6, 2014 · 8 comments

Comments

@harry225
Copy link

harry225 commented Oct 6, 2014

I am implementing Like post functionality in my app. I am using below API for this functionality.

https://api.vineapp.com/posts/1046181520647561216/likes

I have passed "key", which I got in response of login API when I logged in successfully, as session-id in header of request.

I got error every time when I call Like API

{"code": 100, "data": "", "success": false, "error": "You must be logged in to perform this action."}

I did not get any clue for this. Please help me to implement this functionality.
Thanks in Advance.

@hult
Copy link
Contributor

hult commented Oct 6, 2014

Hi,

Given this

import vine
v = vine.Vine()
v.login(username, password)

I can do this

v._call("posts/1046181520647561216/likes", params={"page": None, "size": None})["data"]

And receive a list of likes for that post. It'd be easy enough to bake into a method, and I'd be happy to accept a pull request for it. :)

@harry225
Copy link
Author

harry225 commented Oct 6, 2014

Hey hult

Thanks for replying me. But I don't want all likes of particular video but I want to implement functionality, from where user can like vine video from my iOS app. so I need API for this.

Thanks,

@sandippatel87
Copy link

Hi,

Mail me your exact requirement on sandip@appcodetechnology.net I have
solution for that.

On Mon, Oct 6, 2014 at 8:43 PM, harry225 notifications@github.com wrote:

Hey hult

Thanks for replying me. But I don't want all likes of particular video but
I want to implement functionality, from where user can like vine video from
my iOS app. so I need API for this.

Thanks,


Reply to this email directly or view it on GitHub
#10 (comment).

@hult
Copy link
Contributor

hult commented Oct 6, 2014

@harry225 This is a Python library for the Vine API, hardly something you can use from an iOS app.

@harry225
Copy link
Author

harry225 commented Oct 6, 2014

@hult Is there any API for like video from my app in iOS?

@segalinc
Copy link

What is the difference between count and size fields in the popular['data'] keys?
where popular=v._call("timelines/popular")

@hult
Copy link
Contributor

hult commented Jan 29, 2015

In all lists, size is the number of items you requested per page (seems to default for 20, and actual number of items returned may be lower than this), and count is the total number of items there are.

So when I do popular=v._call("timelines/popular"), I get

popular['data']['count']  # There are 100 popular items
popular['data']['size']  # You requested the first 20
len(popular['data']['records'])  # Vine returned 18 items

If you want more items, use the page parameter.

@segalinc
Copy link

thanks, that is what I was thinking too :)

@hult hult closed this as completed Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants