0
我在AWeber的API与PHP有问题
, 看到下面的代码:AWeber阿比用户问题
$email = '[email protected]';
foreach($account->lists as $offset => $list) {
$subscriber = $account->loadFromUrl("/accounts/$account->id/lists/$list->id/subscribers?ws.op=find&email=$email");
echo $subscriber->id;
break;
}
的问题是,$用户变量包含用户信息,当我使用的print_r()或var_dump()它显示了它的内容,但是当我尝试使用echo或任何打印功能打印用户的id或其他任何内容时,它什么也不显示!
请帮助我快点,我不知道如何解决这个问题。
感谢
编辑:的var_dump()
的$subscriber
object(AWeberCollection)#25 (8) {
["pageSize:protected"]=> int(100)
["_entries:protected"]=> array(0) { }
["_privateData:protected"]=> array(3) {
[0]=> string(7) "entries"
[1]=> string(5) "start"
[2]=> string(20) "next_collection_link"
}
["_iterationKey:protected"]=> int(0)
["adapter"]=> object(OAuthApplication)#3 (10) {
["debug"]=> bool(false)
["userAgent"]=> string(64) "AWeber OAuth Consumer Application 1.0 - https://labs.aweber.com/"
["format"]=> bool(false)
["requiresTokenSecret"]=> bool(true)
["signatureMethod"]=> string(9) "HMAC-SHA1"
["version"]=> string(3) "1.0"
["user"]=> object(OAuthUser)#5 (5) {
["authorizedToken"]=> bool(false)
["requestToken"]=> bool(false)
["verifier"]=> bool(false)
["tokenSecret"]=> string(40) "******"
["accessToken"]=> string(24) "******"
}
["consumerKey"]=> string(24) "******"
["consumerSecret"]=> string(40) "******"
["app"]=> object(AWeberServiceProvider)#2 (4) {
["baseUri"]=> string(26) "https://api.aweber.com/1.0"
["accessTokenUrl"]=> string(46) "https://auth.aweber.com/1.0/oauth/access_token"
["authorizeUrl"]=> string(43) "https://auth.aweber.com/1.0/oauth/authorize"
["requestTokenUrl"]=> string(47) "https://auth.aweber.com/1.0/oauth/request_token"
}
}
["data"]=> array(3) {
["start"]=> int(0)
["total_size_link"]=> string(123) "http://api.aweber.com/1.0/accounts/******/lists/******/subscribers?email=******@******.com&ws.op=find&ws.show=total_size"
["entries"]=> array(1) {
[0]=> array(29) {
["subscription_url"]=> string(22) "http://******.com/"
["postal_code"]=> string(5) "00000"
["id"]=> int(******)
["custom_fields"]=> array(0) { }
["last_followup_sent_link"]=> string(74) "https://api.aweber.com/1.0/accounts/******/lists/******/campaigns/f*******"
["city"]=> string(8) "Non"
["http_etag"]=> string(83) ""******************""
["ad_tracking"]=> string(0) ""
["dma_code"]=> int(******)
["last_followup_message_number_sent"]=> int(1)
["last_followup_sent_at"]=> string(32) "2011-05-08 14:26:15.099159-04:00"
["misc_notes"]=> string(0) ""
["latitude"]=> float(******)
["is_verified"]=> bool(true)
["email"]=> string(18) "******@******.com"
["status"]=> string(10) "subscribed"
["area_code"]=> int(818)
["unsubscribed_at"]=> NULL
["self_link"]=> string(76) "https://api.aweber.com/1.0/accounts/******/lists/******/subscribers/******"
["unsubscribe_method"]=> NULL
["ip_address"]=> string(12) "******"
["name"]=> string(0) ""
["subscription_method"]=> string(11) "signup form"
["resource_type_link"]=> string(38) "https://api.aweber.com/1.0/#subscriber"
["region"]=> string(2) "CA"
["longitude"]=> float(-118.5752)
["verified_at"]=> string(26) "2011-05-11 14:26:15.099159"
["subscribed_at"]=> string(25) "2011-05-011 23:32:39-04:00"
["country"]=> string(13) "United States"
}
}
}
["_dynamicData"]=> array(0) { }
["url"]=> string(77) "/accounts/******/lists/******/subscribers?ws.op=find&email=******@******.com"
}
你能为我们提供'var_dump'输出? – hsz 2011-04-08 08:38:44
我编辑了这个问题,你可以看到'var_dump' – Sayed 2011-04-08 13:51:26