|
|
|
PHP อยากดึงค่า ID ที่เป็น array ซ้อนกันเยอะๆแบบนี้ค่ะ ลอง echo ออกมาค่าไม่ออกค่ะ |
|
|
|
|
|
|
|
ลอง Dump ค่าออกมาดูได้ประมาณนี้ค่ะ
Code (PHP)
Abraham\TwitterOAuth\TwitterOAuth Object
(
[response:Abraham\TwitterOAuth\TwitterOAuth:private] => Abraham\TwitterOAuth\Response Object
(
[apiPath:Abraham\TwitterOAuth\Response:private] => statuses/update
[httpCode:Abraham\TwitterOAuth\Response:private] => 200
[headers:Abraham\TwitterOAuth\Response:private] => Array
(
[cache_control] => no-cache, no-store, must-revalidate, pre-check=0, post-check=0
[content_disposition] => attachment; filename=json.json
[content_encoding] => gzip
[content_type] => application/json;charset=utf-8
[date] => Wed, 14 Jun 2017 06:47:21 GMT
[expires] => Tue, 31 Mar 1981 05:00:00 GMT
[last_modified] => Wed, 14 Jun 2017 06:47:21 GMT
[pragma] => no-cache
[server] => tsa_k
[set_cookie] => guest_id=v1%3A149742284015059938; Domain=.twitter.com; Path=/; Expires=Fri, 14-Jun-2019 06:47:21 UTC
[status] => 200 OK
[strict_transport_security] => max-age=631138519
[transfer_encoding] => chunked
[x_access_level] => read-write
[x_connection_hash] => 552b452a15264e3a7a151f1c015925e7
[x_content_type_options] => nosniff
[x_frame_options] => SAMEORIGIN
[x_response_time] => 1282
[x_transaction] => 0071441400558523
[x_tsa_request_body_time] => 0
[x_twitter_response_tags] => BouncerCompliant
[x_xss_protection] => 1; mode=block
)
[body:Abraham\TwitterOAuth\Response:private] => stdClass Object
(
[created_at] => Wed Jun 14 06:47:20 +0000 2017
[id] => 874880918850347008
[id_str] => 874880918850347008
[text] => This this
[truncated] =>
[entities] => stdClass Object
)
)
)
Code (PHP)
$tw->post('statuses/update', array(
'status' => $status,
'media_ids' => implode(',', array($media1->media_id_string,$media2->media_id_string))
));
$tt=$tw->response->body->id;
echo $tt;
ลอง echo ออกมาดูแล้ว เกิด error ค่ะ
Fatal error: Cannot access private property Abraham\TwitterOAuth\TwitterOAuth::$response in
Tag : PHP
|
ประวัติการแก้ไข 2017-06-14 15:16:18
|
|
|
|
|
Date :
2017-06-14 15:15:00 |
By :
sammam |
View :
1039 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|