Skip to Content Skip to Menu

Facebook tab or canvas integration

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
12 years 10 months ago #185314 by activha
Replied by activha on topic Re: Facebook tab or canvas integration

There's API in CB Connect to also retrieve the ID from the cookie

Ok does this retrieve the ID of the viewed FB page or of the FB user browsing ?
What else can we retrieve from this cookie if I use the getCookie function ?

.. maybe one exists to make it Facebook canvas friendly?

I tried to use three elements :
- component m2c in order to access CB content from a menu link
- CB content modified to show tab or fields of the visited Facebook page or profile
- JFBConnect to manage the canvas and page tab (without the login function that I do with CBconnect)

For now my only problem is to get the visited FB page ID or FB profile ID in order to insert this setting in the module.

Please have a look at what I did (new module based on CB content)

Do you know if I could get this visited FB page/profile ID from the cookie ? or any other way ?

Then I would simply ask the joomla users to fulfill a field with the FB page ID that they want to integrate to Facebook

What do you think ?

File Attachment:

File Name: mod_cbfbhacontent.zip
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 10 months ago #185325 by krileon
Replied by krileon on topic Re: Facebook tab or canvas integration

Ok does this retrieve the ID of the viewed FB page or of the FB user browsing ?

It's of the logged in Facebook user.

What else can we retrieve from this cookie if I use the getCookie function ?

The "code" to be sent to Facebook for validation and return of an access_token. CB Connect has API for that too.

Don't know what any good any of this will do you for your Canvas page, because none of it will likely work on your canvas.

For now my only problem is to get the visited FB page ID or FB profile ID in order to insert this setting in the module.

Simply put, you can't. It's JS based and JS doesn't communicate with PHP. CB Connect doesn't work in this manner either as it only returns the ID of the connected and logged in user, not just any viewing user.

Do you know if I could get this visited FB page/profile ID from the cookie ? or any other way ?

No. The cookie only provides the ID and "code" for the logged in and connected user. Facebook does not set a cookie for simply viewing your page.

Please review Facebooks documentation for better understanding of Facebooks API. CB Connect already prepares the JS library so you of course have full usage of it. CB Connect also offers an http request function (see class file) for handling PHP API usage.

developers.facebook.com/docs/


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • activha
  • activha
  • ONLINE
  • Posts: 2327
  • Thanks: 117
  • Karma: 13
12 years 10 months ago - 12 years 10 months ago #185364 by activha
Replied by activha on topic Re: Facebook tab or canvas integration
Thanks for the infos

The cookie only provides the ID and "code" for the logged in and connected user.

In this cookie can we have access to the user_likes for pages ?
I tried to set up authorization in CBconnect for user_likes and map this to a CB field named Facebook pages.
This would allow me to check what pages the user likes.

I tested but it did not work, FB asked for authorization but nothing was imported in the field (standard text).

Moreover is it possible with CBconnect to have an automatic import of some FB fields each time that the user connects to FB ?

CB Connect already prepares the JS library so you of course have full usage of it. CB Connect also offers an http request function (see class file) for handling PHP API usage.

You mean that if I try :
Code:
$signed_request = $facebook->getSignedRequest(); $page_id = $signed_request["page"]["id"]; $page_admin = $signed_request["page"]["admin"]; $like_status = $signed_request["page"]["liked"]; $country = $signed_request["user"]["country"]; $locale = $signed_request["user"]["locale"];

I would get all that I need ?
Last edit: 12 years 10 months ago by activha.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48437
  • Thanks: 8275
  • Karma: 1443
12 years 10 months ago #185373 by krileon
Replied by krileon on topic Re: Facebook tab or canvas integration

In this cookie can we have access to the user_likes for pages ?

No, the cookie only gives you the users id and their code to exchange for an access token to make https calls on the users behalf.

I tested but it did not work, FB asked for authorization but nothing was imported in the field (standard text).

I've created the below bug ticket to investigate. Possible there's a bug in the field mapping.

forge.joomlapolis.com/issues/3091

Moreover is it possible with CBconnect to have an automatic import of some FB fields each time that the user connects to FB ?

No, field mapping happens at first time registration and never again.

I would get all that I need ?

No, my API is no where near like the above. Please examine the class file closely.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum