Skip to content

Trying to get property of non-object #1

@ronnyandre

Description

@ronnyandre

I've tried using the user_timeline() function with a Twitter account that has two updates. It fetches the updates, but it throws an error:

A PHP Error was encountered
Severity: Warning
Message: Attempt to assign property of non-object
Filename: libraries/Twitter.php
Line Number: 99

The line number 99 in Twitter.php is the following:

$this->user_timeline->text = $this->_parse_message($this->user_timeline->text);

This is my controller:

$this->twitter->auth('oslogeeks', 'secret');
$data['timeline'] = $this->twitter->user_timeline('oslogeeks');

And this is the view:

<ul>
    <?php foreach ($timeline as $tweet): ?>
    <li><?php echo $tweet->text ?></li>
    <?php endforeach; ?>
</ul>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions