Welcome Guest, Not a member yet? Register   Sign In
Tank Auth with Twitter authentication & Facebook
#21

[eluser]imcl[/eluser]
got it -- after entering a unique username and email I can access my website without problems -- awesome code eric! many thanks for sharing.

i wonder how we could streamline this a bit more, a la stack overflow login.

so the idea would be to enter the site immediately after accepting the app -- as you mentioned a unique & temporary username would need to be generated.

how would you retrieve the name/lastname for facebook or google? would this require changing the JS on the login page?

PS:

not sure if it's relevant, but I capitalized the first letters of the class in your controller & models.
#22

[eluser]ericbae[/eluser]
Good stuff. Glad it's working well. Yeah I'm still trying to do something similar to Stackoverflow login system. Making up a username isn't a problem I think, but integrating with OpenID and also using Google's new oAuth authentication would be the next step. Let me know if you get that working! There's also a new LinkedIn authentication, which I think is quite simple to integrate. Maybe I'll get some spare time to work on those.
#23

[eluser]imcl[/eluser]
hey eric, is there anywhere you prefer us to post suggestions to the code? not sure if you want it to be done on this thread.

I am tweaking around and have found certain solutions, eg, to retrieve a user's picture, that may obviate some code in 'facebook_model.php'
#24

[eluser]ericbae[/eluser]
Hey imcl, I geuss one way would be through GitHub page. We can always collaborate on a more detailed manner. Send me a private message then maybe we can get something started!
#25

[eluser]german.zvonchuk[/eluser]
facebook_model have error.

method: getPicture

Code:
function getPicture()
{
    $cookie = $this->get_facebook_cookie();
    $user = @json_decode(file_get_contents( 'https://graph.facebook.com/me/picture?access_token=' .    $cookie['access_token']), true);
    return $user;
}
[function.file-get-contents]: failed to open stream:
file_get_contents - can’t get content because of url redirection.
My question is how can I get redirection url (direct image url)?
#26

[eluser]Mindtricks[/eluser]
Eric great stuff you're doing with tank auth. Is there an example admin panel available for this app? Just some small usermanagement panel like DX Auth has. I tried to merge the DX Auth adminpanel with your Tank Auth version, without luck. ;( (I am originally a designer, not a programmer).
#27

[eluser]ericbae[/eluser]
Hey there @german.zvonchuk

You can also get the user's public profile picture by going directly to the Facebook URL

http://graph.facebook.com/' . $user_id . '/picture?type=large

where you replace $user_id with the Facebook user ID you get from the API. Hope that helps. I found that as the easiest way to get the profile picture.

@mindtricks, honestly, I haven't tried DX Auth so I'm not sure what its Admin interface looks like, but I can see it could be quite useful. Haven't got around to build the admin panel for Tank Auth though. Although now I think about it, it would be quite useful!
#28

[eluser]Mindtricks[/eluser]
Quote:@mindtricks, honestly, I haven’t tried DX Auth so I’m not sure what its Admin interface looks like, but I can see it could be quite useful. Haven’t got around to build the admin panel for Tank Auth though. Although now I think about it, it would be quite useful!

I would appreciate it very much. :-)
If you're interested, I would be happy to help you with designing.

PS 1: Maybe you could take a look at DX Auth's admin panel (its very basic i think) and although Tank Auth's code is seriously reworked, it's based on DX Auth.
PS 2: And like you've got nothing else to do, could you also create a public profile page for Tank Auth's users?
#29

[eluser]Noobigniter[/eluser]
Hello,

i have a problem with twitter connect :/


Quote:A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/tweet.php

Line Number: 204
A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/tweet.php

Line Number: 204
A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/tweet.php

Line Number: 477
A PHP Error was encountered

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /home/admin/domains/xxxxxxxxx/public_html/system/core/Exceptions.php:170)

Filename: libraries/tweet.php

Line Number: 388

exception 'tweetException' with message '401 | Request Failed: - ' in /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php:204
Stack trace:
#0 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(172): tweetConnection->_getResponse('Resource id #22')
#1 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(110): tweetConnection->_addCurl('http://api.twit...', Array)
#2 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(501): tweetConnection->get('http://api.twit...', Array)
#3 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(482): tweetOauth->_httpRequest('GET', 'http://api.twit...')
#4 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(476): tweetOauth->_getRequestToken()
#5 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(388): tweetOauth->_getAuthorizationUrl()
#6 /home/admin/domains/xxxxxxxxx/public_html/application/libraries/tweet.php(34): tweetOauth->login()
#7 /home/admin/domains/xxxxxxxxx/public_html/application/controllers/auth_other.php(67): tweet->login()
#8 [internal function]: auth_other->twitter_signin()
#9 /home/admin/domains/xxxxxxxxx/public_html/system/core/CodeIgniter.php(339): call_user_func_array(Array, Array)
#10 /home/admin/domains/xxxxxxxxx/public_html/index.php(201): require_once('/home/admin/dom...')
#11 {main}

Can you help me please ?

Thank's
#30

[eluser]RJ[/eluser]
Your request failed. Did you setup a twitter app account and modify the config?




Theme © iAndrew 2016 - Forum software by © MyBB