gpt4 book ai didi

android - JTwitter for android 中的 setAPIRootUrl 是什么?

转载 作者:行者123 更新时间:2023-11-29 15:31:54 24 4
gpt4 key购买 nike

在 Twitter 兼容的 API 中,什么是 setAPIRootURL 值?

 twitter=new Twitter("username","password");
twitter.setAPIRootUrl("http://yamba.marakana.com/api");

JTwitter library home page

最佳答案

这只是指向您的 Twitter 兼容服务的 API 端点。

然后实际查询会“低于”,如 http://yamba.marakana.com/api/timeline/home.json ETC。这个 Marakana 是一个基于 status.net 的类似 Twitter 的公共(public)服务。其他的是identi.ca(api端点是http://identi.ca/api/)等等。

正如 Daniel 所写,Twitter 是默认设置。 setAPIRootUrl 的 javadoc 说:

/**
* Set this to access sites other than Twitter that support the Twitter API.
* E.g. WordPress or Identi.ca. Note that not all methods may work! Also,
* search uses a separate url and is not affected by this method (it will
* continue to point to Twitter).
*
* @param url
* Format: "http://domain-name", e.g. "http://twitter.com" by
* default.
*/
public void setAPIRootUrl(String url) {

所以基本上连接到 Twitter 你不需要关心那个方法。

关于android - JTwitter for android 中的 setAPIRootUrl 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5736158/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com