Mak
Mak

Reputation: 161

How to get user Activity using aweber api

i am trying to get user activity via aweber rest api using thier aweber php library.

code:

$all_subscribers = $account->findSubscribers($params);
    foreach ($all_subscribers as $sub) {
       echo "<p><strong>Name:</strong>  {$sub->name}</p>";
       echo "<p><strong>Email:...;
       foreach ($sub->getActivity() as $event) {
           echo "<p>{$event->type}: {$event->event_time}</p>";
        }
}

i am able to get the details such as event type and event timing but i also need to fetch title and the url of the message on which the events were happened. i also tried $event->self_link but it was no help.

Here is the data return by getActivity() method

[data] => Array
    (
        [event_time] => 2017-04-30 07:05:00-04:00
        [resource_type_link] => https://api.aweber.com/1.0/#open
        [http_etag] => "28eb617e4d24407e49b14a9402608f423da2f4a7-ca5feee2b7fbb6febfca8af5541541ea960aaedb"
        [subscriber_link] => https://api.aweber.com/1.0/accounts/1011749/lists/4120909/subscribers/59065294
        [self_link] => https://api.aweber.com/1.0/accounts/1011749/lists/4120909/campaigns/f28501689/messages/40127/opens/15096
        [type] => open
        [id] => 15096
    )

the links the i am trying to fetch

Upvotes: 0

Views: 192

Answers (0)

Related Questions