Can I notify users that I liked their tweet when using tweepy? - twitter

I have a small script to like certain tweets, but I noticed that unlike manual likes these dont show up in a users notifications. I tested this by using the tweet id of a tweet on another account. (Yes the tweet is being liked successfully and it is also shown on the tweet, just not in the notifications of the user)
Is it possible to have it appear in notifications like a "normal" like would?
I tried to see if it had to do with the "high" amount of likes (one per minute) or the type of tweets, no change. Google also didnt show up anything (obviously, thats why Im here).

Related

View Instagram From The Perspective Of A Celebrity, A Presidential Candidate, Or A Close Friend

In 2016, there was an app "Being" that performed this function:
https://www.buzzfeednews.com/article/brendanklinkenberg/this-app-shows-you-what-other-peoples-instagram-feed-looks-l
"Being is an app that lets its users see what Instagram is like for someone else. You log in with your own Instagram account, then choose who you want to be. It could be a friend, it could be a partner, it could be a celebrity, it could be a presidential candidate — anyone with a public account on the photo-sharing service can be accessed. You can even click a button and parachute into a completely randomly chosen person's feed.
The app uses Instagram's API to pull all of the "Following" data from a given account and organize it into a feed. So, if you've ever been curious about what Taylor Swift actually sees when she logs into Instagram — minus the many thousands of notifications from adoring fans — this is the app for you."
Unfortunately, Instagram has removed data access from the app, so it's no longer available. It annoys me that Instagram restricts access to its API.
Does anyone know how to recreate this function?
Can I do this in the Instagram developer environment?
It has to be possible - there has to be a way around it.
One idea I have is instead of using Instagram's API, the content from all of a user's followings is parsed.

How to aggregate iOS push notifications using Parse

so I'm developing an application where a user might get a notification based on some action but I only want the user to receive one notification of a specific type. An example might illustrate this better:
Say a user on facebook makes a facebook post. If someone likes the post they'll get a notification. However, if 20 different people like that post I don't want 20 separate notifications when they finally check their phone. I want one notification that says '20 people have liked your post.' I also only want to track the new notifications. Say 20 people have liked your post. I don't want the notification for the next 5 who've liked your post to be '25 people have liked your post.' I want it to be '5 new people have liked your post.'
What I don't know how to do is delete a notification that got sent using Parse. An idea I thought of off the top of my head for recording new posts was to keep track of what the user has seen for that post but that seems silly. It's a large amount of data to keep track of, compared to querying for a previous notification to that user for that channel (is that possible?).
Anyways, I was hoping other users of Parse using push notifications might've faced this problem and how you all might've gotten around it. I would like to implement my own backend but I don't have the expertise and I'm currently focused on the client side. Any help or suggestion would be greatly appreciated. Thanks!
The thing is, you have don't have the control to cancel a Push Notification. However, you do have a control when to send even how to send it. If you want to implement something like you say, you have to do custom works on that. You might observe a period of time like 2-3 minutes whether there are more than for example 10 notifications you want to send. If so, send one instead.
Before iOS 8, Push Notification did have so many limitations like we can not have our own custom action. But now, I think Apple will let us do more as time goes by.
This might not be the best way but here's how I plan on implementing the feature. I'm going to add a notifications array to the user ([Notification objects]), this will also allow me to query for notifications for a possible notifications page. Say this were facebook and the user gets a new like notification on a post (1 like total).
I will create a new notification object and add it to the User object's notifications array with properties 'seen' set to false, 'prevNotificationLikes' set to 1, and then send out a notification. The message will be generic for singular/plural #'s of likes.
If someone else likes the post before the user responded to the push notification, I will see that the user hasn't 'seen' (false) the first notification and I will not send out a new notification.
Say 19 people like the post and then the user checks the initial notification and sets the 'seen' property to true. The next notification check on the cloud code for the 21st like will query to see if there are any previous notifications for that post/user. Parse cloud will then find a corresponding notification for that post/like where prevNotificationLikes is equal to 1 and update that number to 21. If the 'seen' property is set to true, then it'll send out a notification '20 new people have liked your post.' I know that the notifications are sent 1 step late with the fact that the user probably already knows that 19 people have liked the post but it'll be a compromise to get the job done.
Any critique is welcome. Sorry for wall of text instead of code. I'm just writing out my idea before writing the code so that I have something to follow along.

Incorrect favorites count on Twitter

So I have created an small java program with Twitter4J. The main purpose is to destroy all of my favorites. However, Twitter seems to be misrepresenting the favs count. This is what I see on my profile:
I know it's in Spanish but it translates as "You have not marked any Tweet as favorite yet". However, on the stats we can see that I have 6,021 favs.
Does anyone know why is this or if someone has noticed before? Calls to the twitter API also return with zero favs.
Thanks!
I had noticed that, but on Tweets.
Sometimes Twitter counts wrong the numbers of Tweets (or in your case favorites) and that happens because those tweets are too old. Maybe you have an old account (2010-2011) and you had marked those tweets as favorites before.
This is because you can't see the tweets, but you've still got them favorited. There are several ways this can happen. For example:
You have been blocked by the profile you favorited
Their profile is now locked so you can no longer see their tweets you favorited
In both cases, you can't see the tweets themselves, but the tweets aren't deleted, so they still count towards your total.

How long to loop friends of friends

I'm looking to possibly build an iOS app where I would need to get a list of friends of the logged in user who are also using the app and then loop over that list to get an even bigger list of their friends who are also using the app. Hopefully the little scenario below will better illustrate what I mean if it's not clear
Lets say "Sam" uses my app and he has 400 friends of which 30 are using my app. I would like to loop the 30 friends who are using the app to get their friends list so lets say the first person of the 30 is "Jake" and he has 10 friends who are also using the app they should be added to an array and then the next person in the 30 people loop is "Jen" and she has 15 people using the app they would be added to Jake's 10 friends and so on.
I know it's possible according to this link Get a list of friends of a friend on Facebook to get the friends list of a friend but my main concern is speed. Do you think getting a list of friends of friends would take too long for a user of the iOS app?
The list grows linearly, so I don't think there would be much of a speed issue. You can always set a limit to the total number of calls. For example, if I have 200 friends using your app and you limit the number of calls to 100, only the first 100 friends' friends will be shown. That can be quite an extensive list.
You could also inform your user that the operation he/she is trying to perform might take a while and give them the right to cancel at any time. When they cancel you could display the data you already received.
As a last note instead of using an array to store the friends of friends list, It would be better to use a set because chances are many of those people are already friends with each other. So if "Jake" and "Jen" are friends, they would not appear twice on the list.

Open Graph on mobile (iOS)

I would like to realize an iPhone app with Facebook OpenGraph to push user activities directly in Facebook (for this part, it's OK). BUT, I would like to show friends activities for the same verb. In dev Facebook documentation, I don't find API to get friends activities...
Any ideas ?
GET /me/{namespace}:{action-type}
GET /me/{namespace}:{action-type}/{object-type}
Don't forget to ask for the permissions firends_actions:namespace
Namespace = namespace of your app
Find friends with the app (this gives you a nice tidy list)
Option 1. Use Fql.query so you can apply filters and get back only what you need...
Fql.query POST
SELECT uid, name, pic from user where uid in (select uid2 from friend where uid1=me()) and is_app_user=1", #"query
option 2. Use opengraph and get back a mother list of friends with their ID any fields you want to read (installed status shown)
GET me/friends&fields=installed
Then use the Friends list to download their {action-type} executions
Option1. Enumerate through your friends activity with this and then bare it all:
GET /friend_id/{namespace}:{action-type}
option 2. Force the user to browse the list of friends with the app...
They choose the friend and then ->
GET /friend_id/{namespace}:{action-type}
They get a list of that users last 25 actions.
It's how instagram works when you browse.
The thing we all want is to just have a feed with the last 25-50 actions by friends. Just like the activity plugin. At this point it seems like there is no way to get it. I spent hours searching and everyone ends up saying you need to do it manually on your own server. I wouldn't be surprised if this activity function is added to the graph sdk eventually. It's a reasonable request.

Resources