HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Fb: Registration

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#80074 (In Topic #16263)
Avatar

Well-settled

1.  Is there a way to cache and use the users fb "profile_pic" as there avatar?
2.  Can you remove the part in the facebook connect script that checks against an ip:address which would for one make it possible for dev's to create test user accounts and two allow families that share a computer to have multiple accounts.  I realize that this would create an opening for fraudulent accounts but I saw in the facebook docs that you can check against meta data instead using some jquery plugin.  This is my third post in a row though so I'm gonna take a break, but if you'd like a link to those docs just ask.
Back to the top
 
Posted
Rating:
#80086
Avatar

1- the new v8 addon will do this. That said I think you said you were using what is in github so it should be already.

2- I don't think it does have any IP address restriction. I can't say I've checked, but I'm not aware of one. Facebook uses cookies and also stores stuff on Facebook's systems saying a profile is logged into a certain site. But two different browsers/machines/machine-accounts should have their own separate cookie settings controlling both the regular Facebook login and the Facebook connect stuff.
I may be wrong, Facebook may be doing something weird, but I am not aware of it.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#80091
Avatar

Well-settled

My bad I saw the ip verification in the fix zip for the 7.1 add-on in the ocf user action script right after the time stamp line.
But yeah, I'm running v8 right now and I would like to install the latest commit.  Do I basically have to start fresh?

Does anyone know what I can use to ref. the access_token from within a template file… eg: http://yadayadayada.com/dialogs?appid=xxx&access_token=???

I've tried {$key} and {$everything_freaking_else}

I'm trying to run dialogs in an iframe and in order to do so I have to pass a token, but it says it error 102 I need a session key.
  The session key is just a small part of the access token but I think I have to pass the whole thing and it also must be valid and I believe from a user.
Back to the top
 
Posted
Rating:
#80095
Avatar

Well-settled

Yeah it def has to be from a user…  I can get it working if I get a token from facebooks access token tool.  I'll have a pretty nice plugin to share when I get this done.
Back to the top
 
Posted
Rating:
#80109
Avatar

Right, I'll give a fairly long answer to this because it's complex.

The site itself can be tied into Facebook (IIRC at Admin Zone > Setup > Facebook oauth). Therefore the site itself has an oauth-initiated access token.  The site gets oauth'd to the Facebook account of the site admin and then the site can remember this and use it.
sources_custom/hooks/systems/syndication/facebook.php uses this. This is for syndication of site activities onto a Facebook page.

This uses the PHP Facebook API, but the actual token comes out of ocPortal's long_values table where it is stored when the oauth happens.

However you asked about user tokens. We initiate user Facebook logins via the Facebook Javascript API. The Facebook PHP API then is used to confirm them and ocPortal converts to an ocPortal login. This is in sources_custom/facebook_connect.php.

At no point does ocPortal deal with the access token for a user, because we are relying on Facebook's APIs to do that. We don't store it either (although actually writing this up does make me think that could be useful, so that things could be done onto a users Facebook account without them having to directly initiate it via a real-time request). The access token for the current user should be exposed via the PHP Facebook API.

I am going to commit an {$FB_CONNECT_ACCESS_TOKEN} symbol you can use for this. This will be the sources_custom/hooks/systems/symbols/FB_CONNECT_ACCESS_TOKEN
.php file if you are interested in how I'm doing it.

Alternatively it should be possible to get via Javascript. Here is something I found via some quick Googling…
[JavaScript] function postOnFacebook(msg, itemLink, pic, itemTitle) { FB.init({ - Pastebin.com


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#80146
Avatar

Well-settled

I saw that commit on gethub man… That seems like so much work and I appreciate it. I thought you would just be able to do something like "dollars fb_access_token equals dollars facebook dash greaterthan getAccessToken. What I ended up doing was just adding the sdk in its own folder and made a page to stick in an iframe. I'm gonna try to post it here.I played around with getting it to reload since it's hard to specify a target in a redirect uri and ended up just making a re-direct page that sent out the dialogs link again.


Last edit: by GodzMuzicIan
Back to the top
 
Posted
Rating:
#80147
Avatar

Well, you effectively did what I did ;). The SDK is distributed with the ocPortal addon already (sources_custom/facebook/facebook.php).


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#80148
Avatar

Well-settled

Does the code support facebook credits?
Back to the top
 
Posted
Rating:
#80149
Avatar

Not sure. It's the latest code from a few months ago. I haven't really looked at FB credits (actually had not heard of them until you mentioned it). My guess is you'd just be expected to make calls via the 'api' method in the class.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: