Twitter流API请求 - 不要关注某些用户

时间:2022-12-09 07:09:01

I don't want to receives tweets from certain users. Twitter documentation mentions about "follow" param, but I need inversion of this option. Is there any other option than filtering it on the side of my app?

我不想收到某些用户的推文。 Twitter文档提到“跟随”参数,但我需要反转此选项。除了在我的应用程序侧面过滤它还有其他选择吗?

2 个解决方案

#1


1  

The standard Twitter streaming API filter options do not allow you to exclude results from the filter pattern - it is inclusive. The enterprise PowerTrack API does have the ability to exclude terms and users as part of the filter pattern, but it is commercial.

标准的Twitter流API过滤器选项不允许您从过滤器模式中排除结果 - 它是包容性的。企业PowerTrack API确实可以排除术语和用户作为过滤模式的一部分,但它是商业的。

You will have to filter the results in your own code. You could do this by looking for the presence of the user object belonging to the user you want to exclude, and ignoring those Tweets.

您必须在自己的代码中过滤结果。您可以通过查找属于要排除的用户的用户对象的存在来执行此操作,并忽略这些推文。

#2


-1  

If you don't want to see tweets from specific users on your timeline you can simply mute those users. Muting just turn off their tweets from your timeline and the he/she will still remain in your following list.

如果您不想在时间轴上看到特定用户的推文,则可以简单地将这些用户静音。静音只是从你的时间线关闭他们的推文,他/她仍然会留在你的下面的列表中。

If you are looking to do this via Twitter API here is the reference link https://dev.twitter.com/rest/reference/post/mutes/users/create

如果您希望通过Twitter API这样做,请参考链接https://dev.twitter.com/rest/reference/post/mutes/users/create

And if you want to mute users from Desktop or Mobile you can click on Down Arrow icon and select Mute @username. Twitter流API请求 - 不要关注某些用户

如果您想要从桌面或移动设备静音用户,您可以单击向下箭头图标并选择静音@username。

#1


1  

The standard Twitter streaming API filter options do not allow you to exclude results from the filter pattern - it is inclusive. The enterprise PowerTrack API does have the ability to exclude terms and users as part of the filter pattern, but it is commercial.

标准的Twitter流API过滤器选项不允许您从过滤器模式中排除结果 - 它是包容性的。企业PowerTrack API确实可以排除术语和用户作为过滤模式的一部分,但它是商业的。

You will have to filter the results in your own code. You could do this by looking for the presence of the user object belonging to the user you want to exclude, and ignoring those Tweets.

您必须在自己的代码中过滤结果。您可以通过查找属于要排除的用户的用户对象的存在来执行此操作,并忽略这些推文。

#2


-1  

If you don't want to see tweets from specific users on your timeline you can simply mute those users. Muting just turn off their tweets from your timeline and the he/she will still remain in your following list.

如果您不想在时间轴上看到特定用户的推文,则可以简单地将这些用户静音。静音只是从你的时间线关闭他们的推文,他/她仍然会留在你的下面的列表中。

If you are looking to do this via Twitter API here is the reference link https://dev.twitter.com/rest/reference/post/mutes/users/create

如果您希望通过Twitter API这样做,请参考链接https://dev.twitter.com/rest/reference/post/mutes/users/create

And if you want to mute users from Desktop or Mobile you can click on Down Arrow icon and select Mute @username. Twitter流API请求 - 不要关注某些用户

如果您想要从桌面或移动设备静音用户,您可以单击向下箭头图标并选择静音@username。