That just means you have PHP set to display helpful errors, such as
the use of a variable that was not initialized before first use.  The
hosting service will likely have these errors turned off.  You can
edit the library and correct such notices, or you can just use them as
feedback on your locahost dev server.

~PK

On Wed, Mar 17, 2010 at 10:01 AM, Cassidy <cassc...@gmail.com> wrote:
> Like many others who post on these type of boards, I'm going to first
> mention that I'm a newb.
>
> Note: I'm using the PHP library TwtterLibPHP (http://github.com/jdp/
> twitterlibphp)
>
> I'm trying to pull out various pieces of information (in this case the
> user name) using the status/mentions method in the json format and
> while it works, it keeps giving me the followin g notice:
>
> "Notice: Undefined index: screen_name in /opt/lampp/htdocs/xampp/
> twitter/index.php on line 18"
>
> I searched online for an answer, some mentioned to just hide the
> notice, but that doesn't really fix it...anybody have an idea to
> resolve this?
>
> Thanks,
> Cassidy
>
> Here is my code snippet:
>
> <?php
> require_once('twitlib/twitter.lib.php');
>
> $username = 'theusername';
> $password = 'thepassword';
>
> $twitter = new Twitter($username, $password);
>
> $mentions = $twitter->getMentions(array('page'=>1), 'json');
>
> $mentions_decode = json_decode($mentions);
>
> echo "@" . $mentions_decode['screen_name'] . " just mentioned me"; \
> \The line giving me the notice
>
> ?>
>

Reply via email to