Hi,
Voor een kleine site probeer ik een twitter api erop te smijten
Maar nu kan ik wel inloggen op Twitter maar als je dan bent ingelogd krijg ik dit:
Undefined index: port
Foutcode #8
Bestand /twitter/twitteroauth/OAuth.php
Lijn 383
Wie weet hoe ik dat kan fixen? Want als ik bijvoorbeeld in me twitter api map ga dan zie je dat er geen errors zijn maar wanneer ik de onderstaande code in me header.php doe dan geeft hij errors aan.
Door die connectie variables geeft hij die undefined errors aan. (let niet op uitlijning)
Gegroet,
Shahiem
Voor een kleine site probeer ik een twitter api erop te smijten
Maar nu kan ik wel inloggen op Twitter maar als je dan bent ingelogd krijg ik dit:Undefined index: port
Foutcode #8
Bestand /twitter/twitteroauth/OAuth.php
Lijn 383
$parts = parse_url($this->http_url);
$port = @$parts[port]; // Regel 383
$scheme = $parts[scheme];
$host = $parts[host];
$path = @$parts[path]; Wie weet hoe ik dat kan fixen? Want als ik bijvoorbeeld in me twitter api map ga dan zie je dat er geen errors zijn maar wanneer ik de onderstaande code in me header.php doe dan geeft hij errors aan.
Door die connectie variables geeft hij die undefined errors aan. (let niet op uitlijning)
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]DOCUMENT_ROOT[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]/projecten/pf/api/twitter/twitteroauth/twitteroauth.php[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/include"]include[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]DOCUMENT_ROOT[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]/projecten/pf/api/twitter/config.php[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]access_token[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]access_token[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]oauth_token[/COLOR][COLOR= #007700]]) ||[/COLOR] [URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]access_token[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #DD0000]oauth_token_secret[/COLOR][COLOR= #007700]]))[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<a href="[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/LINK"]LINK[/URL][COLOR= #007700].[/COLOR][COLOR= #DD0000]api/twitter/redirect" title="Sign in with Twitter" class="sign twitter"><span>Twitter</span></a>[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]/* Get user access tokens out of the session. */[/COLOR]
[COLOR= #0000BB]$access_token[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]access_token[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #FF8000]/* Create a TwitterOauth object with consumer/user tokens. */[/COLOR]
[COLOR= #0000BB]$connection[/COLOR] [COLOR= #007700]= new[/COLOR] TwitterOAuth[COLOR= #007700]([/COLOR]CONSUMER_KEY[COLOR= #007700],[/COLOR] CONSUMER_SECRET[COLOR= #007700],[/COLOR] [COLOR= #0000BB]$access_token[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]oauth_token[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$access_token[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]oauth_token_secret[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$content[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$connection[/COLOR][COLOR= #007700]->[/COLOR]get[COLOR= #007700]([/COLOR][COLOR= #DD0000]account/verify_credentials[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$content[/COLOR][COLOR= #007700];
}[/COLOR]
?> Gegroet,
Shahiem