Weibo/getaboutme

出自天涯开放平台资源

跳转到: 导航, 搜索

目录

Weibo/getaboutme

获取提到我的评论

URL

http://open.tianya.cn/api/weibo/getaboutme.php

支持格式

XML/JSON

HTTP请求方式

POST

是否需要登录

true,关于授权机制,参见OAuth相关说明

请求参数

  必选 类型及范围 说明
appkey true string 申请应用时分配的appkey,调用接口时候代表应用的唯一身份
oauth_token true string 授权成功后所获得的 oauth_token
oauth_token_secret true string 授权成功后所获得的oauth_token_secret
timestamp true string 请求时候产生的时间戳time()
tempkey true string strtoupper(md5($timestamp.$appkey.$oauth_token.$oauth_token_secret.$appsecret))
outformat false string 可选,返回数据格式,默认为json

注意事项

http://open.tianya.cn/api/weibo/getaboutme.php
若取当前用信息错误,则返回400错误,提示:"error_code"=>"40002", "error_msg"=>"request data error若取当前用信息错误,则返回400错误,提示: "error_code"=>"40002", "error_msg"=>"request data error"

返回结果

XML示例

<?xml version="1.0" encoding="utf8"?><data><total>1</total><items><item id="0"><sharedUname></sharedUname><sharedBody></sharedBody><sharedStartype>0</sharedStartype><time>1314601998000</time><id>37086400</id><star>0</star><originContent>@yiercn ererr</originContent><sharedMedia></sharedMedia><sharedReplyCount>0</sharedReplyCount><shareCount>0</shareCount><url></url><sharedStarurl></sharedStarurl><body></body><sharedId>0</sharedId><startype>0</startype><medias></medias><sharedStar>0</sharedStar><word><a href="http://my.tianya.cn/name/yiercn" target="_blank">@yiercn</a> ererr</word><sharedTitle></sharedTitle><uid>51218315</uid><media></media><from>来自天涯微博</from><uname>opentest</uname><stardesc></stardesc><sharedUid>0</sharedUid><sharedShareCount>0</sharedShareCount><starurl></starurl><replyCount>0</replyCount><sharedMedias></sharedMedias><sharedStardesc></sharedStardesc></item></items></data><result>1</result><error></error>

JSON示例

{"data":{"total":"1","items":[{"sharedUname":"","sharedBody":"","sharedStartype":0,"time":1314601998000,"id":37086400,"star":0,"originContent":"@yiercn ererr","sharedMedia":"","sharedReplyCount":0,"shareCount":0,"url":"","sharedStarurl":"","body":"","sharedId":0,"startype":0,"medias":{},"sharedStar":0,"word":"@yiercn ererr","sharedTitle":"","uid":51218315,"media":"","from":"来自天涯微博","uname":"opentest","stardesc":"","sharedUid":0,"sharedShareCount":0,"starurl":"","replyCount":0,"sharedMedias":{},"sharedStardesc":""}]},"result":1,"error":""}其他

PHP示例

SDK下载

SDK下载
代码示例如下: 
include 'tyapi.php'; 
//参数设置 
$appkey=; 
$appsecret=;
$url = 'http://open.tianya.cn/api/weibo/getaboutme.php';
$data = do_post($url,$appkey,$appsecret,$_SESSION["oauth_token"],$_SESSION["oauth_token_secret"],$param);
查看
个人工具
成功案例
帮助中心