Facebook:我可以以编程方式添加朋友吗? [英] Facebook: Can I Programmatically Add a Friend?

查看:50
本文介绍了Facebook:我可以以编程方式添加朋友吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有 Facebook API 可以添加好友?我找不到一个,但后来我找不到任何说明没有的地方,这似乎是很多人会问的问题.

Is there a Facebook API to add a friend? I can't find one, but then I can't find it stated anywhere that there isn't one, and this seems like something a lot of people would be asking about.

(注意:我说的不是 Facebook 应用程序,而是基于 HTTP 的 API.)

(Note: I'm not talking about a Facebook application, but rather an HTTP-based API.)

澄清

我应该提到我正在尝试通过用户授权来做到这一点.他们给了我他们的用户名和密码.不要试图向任何人发送垃圾邮件.

I should mention that I'm trying to do this WITH the users authorization. They give me their username and password. Not trying to spam anyone.

Twitter 有一个非常简单的 API 来执行此操作;我希望 Facebook 也这样做.

Twitter has a very simple API for doing this; I'd hoped Facebook did too.

推荐答案

我认为没有办法做到这一点.这是基于用户的选择.最好的办法是让用户推送到相关个人资料并让他们完成工作.

I do not think there is a way to do this. This is based on user's choice. The best bet would be to have the user pushed to the profile in question and have them do the work.

您应该永远要求提供 facebook 的用户名和密码.这违反了 facebook 的条款和糟糕的设计选择.您应该使用他们的标准 API 来访问/来自 facebook 的数据.

You should never ask for a username and password for facebook. that is a violation of the terms of facebook and a poor design choice. you should use their standard api for accessing data to/from facebook.

这篇关于Facebook:我可以以编程方式添加朋友吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆