iPhone 的 Twitter 搜索提醒

发布于 2024-08-16 03:28:03 字数 174 浏览 4 评论 0原文

当发现新的 Twitter 搜索结果时,我想使用 Urban Airship 将推送通知发送到用户的 iPhone。

我非常肯定我需要一个网络应用程序来完成此任务 - 注册用户的 iPhone、保存他们的搜索词并轮询 Twitter 搜索。我该如何构建这个应用程序(就使用哪种语言等而言)?

非常感谢。

I'd like to use Urban Airship to send push notifications to a user's iPhone when a new Twitter Search result is found.

I'm pretty positive I'd need a web app built to accomplish this - to register the user's iPhone, save their search terms and poll Twitter Search. How could I go about building this app (in terms of which language to use, etc.)?

Thanks so much.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

生死何惧 2024-08-23 03:28:03

你是对的,你需要构建一个 Web 应用程序来自动搜索 Twitter,然后创建推送通知有效负载以传递给你的用户。此外,您可能希望您的应用程序还接受用户的请求以检索实际的推文。这是因为您不能仅将推文内容加载到通知负载中,因为它们的大小限制相当小。

由于 Urban Airship 通过 HTTP 工作,因此您可以使用任何您想要的语言。只要按照你所知道的去做,没有首选的方法。

不过我要说的是——每秒都会添加很多很多的推文。无论您尝试做什么,可扩展性可能都会发挥相当大的作用。这可能就是为什么一年后没有太多 Twitter 应用程序支持 Push 的原因。

You are right, you need to build a web app which automatically searches Twitter and then creates a push notification payload to deliver to your users. In addition, you may want your app to also accept requests from users to retrieve the actual tweets. This is because you can't just load up the tweet content into a notification payload, as their is a rather small size limit.

Since Urban Airship works via HTTP, you can use whatever the heck language you want. Just go with what you know, there is no preferred way to do it.

I will say this though - there are lots and lots of tweets added every second. Scalability is probably going to play a pretty big factor in whatever you are trying to do. Which is probably why a year later there aren't very many Twitter apps that support Push.

相守太难 2024-08-23 03:28:03

前面所说的一切都是正确的,我只是想添加一件事:

我强烈建议查看 http://superfeedr.com处理获取数据。

借助 Superfeedr,您可以利用其 PubSubHubbub API,而不必执行任何 RSS解析你自己。

该流程的工作原理如下:

  1. 用户在手机上订阅 Twitter 用户/搜索。
  2. 电话告诉您的服务用户 X 已订阅。
  3. 您的 Web 应用程序向 superfeedr 注册以观看该 RSS 提要(并且您可以跟踪此关系)。
  4. 当出现新项目时,Superfeedr 会将最新项目发布到您的 Web 应用程序。
  5. 您查找用户和源之间的关系,并告诉 Urban Airship 向该用户发送警报。

这样,您的网络应用程序所要做的就是智能地跟踪关系。

Everything said previously is correct, I just wanted to add one thing:

I strongly recommend looking into http://superfeedr.com to handle getting te data.

With Superfeedr, you can take advantage of their PubSubHubbub API and not have to do any of the RSS parsing yourself.

Here's how the flow would work:

  1. User subscribes to a Twitter user/search on the phone.
  2. Phone tells your service that User X has subscribed.
  3. Your web app registers with superfeedr to watch that RSS feed (and you keep track of this relationship)
  4. When a new item appears, Superfeedr POSTs to your web app with the latest items.
  5. You look up the relationship between user and feed and tell Urban Airship to send an alert to that user.

This way, all your webapp has to do is intelligently keep track of relationships.

微暖i 2024-08-23 03:28:03

@bpapa 是对的,你应该使用你最了解的语言。另外,我建议您研究一下 Twitter Streaming API,它将帮助您使您的应用程序真正实现实时。

@bpapa is right and you should use the language you know best. Also, I would recommend looking into Twitter Streaming API, it will help you make your application actually realtime.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文