http://wx4.sinaimg.cn/mw690/006CUWv3gy1fczaa5ei0bg309906yhdt.gif 求出处小七

UnFollows a user. Returns the befriended user’s profile when successful.
POST/DELETE
for authorization details
for the Request Count Limitaiton details.
Type and Range
Description
AppKey for the application to identify it. ( This parameter is not needed when using OAuth)
int64/string
The ID(int64) or screen-name(string) of the user to be friended. This parameter is a RESTful parameter. On usage please see Notes.
Specfies the ID of the user to befriend. Helpful for disambiguating when a valid user ID is also a valid screen name.。
screen_name
Specfies the screen name of the user to befriend. Helpful for disambiguating when a valid screen name is also a user ID.
Id, user_id, screen_name: one of theses three parameters is required.
 :id is a RESTful parameter. URL of using this parameter: Usage examples:
Returns 400 error when follows ID does not exist.
Returns HTTP 403 status when the user has already been friended.
curl -u "username:password" -d "user_id=uid" ""
curl -u "username:password" -d "user_id=uid" ""
&?xml version=&1.0& encoding=&UTF-8&?&
&screen_name&.......&/screen_name&
&name&.......&/name&
&province&11&/province&
&city&8&/city&
&location&北京 海淀区&/location&
&description&.......&/description&
&url&http://1&/url&
&profile_image_url&//50//1&/profile_image_url&
&domain&.......&/domain&
&gender&m&/gender&
&followers_count&40&/followers_count&
&friends_count&97&/friends_count&
&statuses_count&88&/statuses_count&
&favourites_count&0&/favourites_count&
&created_at&Tue Jul 13 00:00:00 +&/created_at&
&following&false&/following&
&verified&false&/verified&
&allow_all_act_msg&false&/allow_all_act_msg&
&geo_enabled&true&/geo_enabled&
&created_at&Mon Dec 06 10:24:28 +&/created_at&
&text&生死簿上记载,我的寿命还有17437天(约48年)
/hbyVR6&/text&
&a href=&&&玩意网&/a&
&favorited&false&/favorited&
&truncated&false&/truncated&
&in_reply_to_status_id/&
&in_reply_to_user_id/&
&in_reply_to_screen_name/&
&thumbnail_pic&/thumbnail/57e160a3jw6dc2ondgoytg.gif&/thumbnail_pic&
&bmiddle_pic&/bmiddle/57e160a3jw6dc2ondgoytg.gif&/bmiddle_pic&
&original_pic&/large/57e160a3jw6dc2ondgoytg.gif&/original_pic&
&name& : &........&,
&domain& : &.........&,
&geo_enabled& : true,
&followers_count& : 40,
&statuses_count& : 88,
&favourites_count& : 0,
&city& : &8&,
&description& : &.......&,
&verified& : false,
&status& :
&created_at& : &Mon Dec 06 10:24:28 +&,
&text& : &生死簿上记载,我的寿命还有17437天(约48年)
&bmiddle_pic& : &/bmiddle/57e160a3jw6dc2ondgoytg.gif&,
&original_pic& : &/large/57e160a3jw6dc2ondgoytg.gif&,
&truncated& : false,
&in_reply_to_status_id& : &&,
&in_reply_to_screen_name& : &&,
&geo& : null,
&favorited& : false,
&thumbnail_pic& : &/thumbnail/57e160a3jw6dc2ondgoytg.gif&,
&in_reply_to_user_id& : &&,
&id& : ,
&source& : &&a href=\&\& rel=\&nofollow\&&玩意网&/a&&
&id& : ,
&gender& : &m&,
&friends_count& : 97,
&screen_name& : &.......&,
&allow_all_act_msg& : false,
&following& : false,
&url& : &http://1&,
&profile_image_url& : &//50//1&,
&created_at& : &Tue Jul 13 00:00:00 +&,
&province& : &11&,
&location& : &北京 海淀区&
id: User ID
screen_name: User’s nickname displayed on the home page
name: Friendly displayed name, the same as screen_name
province: Province code ( see )
city: City code ( see )
location:Address
description: Personal description
url: Url of the user’s blog
profile_image_url:
Profile image
domain: The user’s personalized weibo url
Gender, m—male, f- - female, n-- unknown
followers_count: Followers count
friends_count:
Following count
statuses_count: Weibo count
favourites_count:
Favorites count
created_at: Created time
following: Whether the current user is following the user that posts the weibo (Not supported yet)
verified: Whether the user is verified by his real identity, marked with “V”
created_at: Create time
id: Weibo ID
text: Weibo content
source: Weibo source
favorited: Whether it is favroited
truncated: Whether it is truncated
in_reply_to_status_id: The reply’s ID
in_reply_to_user_id:
UID of the replyer
in_reply_to_screen_name: Nickname of replyer
thumbnail_pic: Thumbnail picture
bmiddle_pic: Medium picture
original_pic:Original picture
user: User profile
retweeted_status: eposted weibo content, the content is the status, This filed is only available for a reposted weibo.
Please download Java SDK from .
Sample Code:
package weibo4j.
import weibo4j.W
import weibo4j.WeiboE
public class DestroyFriendship {
* 取消关注
* @param args
public static void main(String[] args) {
System.setProperty(&weibo4j.oauth.consumerKey&, Weibo.CONSUMER_KEY);
System.setProperty(&weibo4j.oauth.consumerSecret&, Weibo.CONSUMER_SECRET);
User user = getWeibo(true,args).destroyFriendship(args[2]);//args[2]:关注用户的id
System.out.println(user.toString());
} catch (WeiboException e) {
e.printStackTrace();
private static Weibo getWeibo(boolean isOauth,String[] args) {
Weibo weibo = new Weibo();
if(isOauth) {//oauth验证方式 args[0]:访问的token;args[1]:访问的密匙
weibo.setToken(args[0], args[1]);
}else {//用户登录方式
weibo.setUserId(args[0]);//用户名/ID
weibo.setPassword(args[1]);//密码
Please download PHP SDK with OAUTH supported from
Sample Code:
//friendships/destroy
//取消关注
$c = new WeiboClient( WB_AKEY ,
$_SESSION['last_key']['oauth_token'] ,
$_SESSION['last_key']['oauth_token_secret']
//关注用户的id
$u_id = &u_id&;
$msg = $c-&unfollow($u_id);
if ($msg === false || $msg === null){
echo &Error occured&;
if (isset($msg['error_code']) && isset($msg['error'])){
echo ('Error_code: '.$msg['error_code'].';
Error: '.$msg['error'] );
if (isset($msg['screen_name'])){
echo('Unfollow Friend:'.$msg['screen_name']);
文档更新时间: 20 January 2011}

我要回帖

更多关于 求出处吧 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信