Passing user data from Connect With Facebook button into Modx profile fields - facebook

I've been trying to use the Connect With Facebook button on a Modx Revolution site. I've been following along with this guide here: http://edwardawebb.com/web-development/facebook-login-modx-sites.
So far, I have the button creating the new user, but it's not passing through the data from the Facebook profile to the Modx profile fields. In addition to that, I need a way to tell the user what their username is so they can login with that username if they chose to (as opposed to using the Connect with Facebook button again).
Here is what my snippet looks like that is creating the profile from the Connect with Facebook button: http://pastebin.com/jdf5zrA8
Eventually, I want to collect more user data than what's in there now, but I figured I would start simple for now. Since this is a bit more advanced than my skills are.
I appreciate any help.

I'm just about to release an extra for MODX Revolution which will do what you need - see http://www.hyper-typer.com/news/facebook-login-modx and http://www.github.com/freelancewebdev/fblogin - particularly the snippets in core/components/snippets.

Related

Custom Dynamic Links in Firebase that goes to user profile

Im pretty new to Firebase, so please bear with me on this one. This problem has been stuck in my head for the past days.
I have seen some videos on Dynamic Links, but i havent seen some clear answers to what im hoping to achieve. I want to create a Dynamic Link, that allow users to share their account with their friends (through a link).
So my question is how can i manually construct a dynamic link (with User A´s uid), so when User B clicks on that link (and has the app) it will go straight into the profile of User A?
Should i create a link when a user signs up and store it under their profile in the database?
Looking forward to hearing how you guys would go about solving this problem im having.
You essentially want to create link where the link parameter (what's called the "Deep link URL" in the Firebase console) looks something like https://www.example.com/userProfile?uid=314159. (The full deep link will look different than this.)
When your app opens up this dynamic link, it will convert the incoming URL to a Dynamic Link object, and that object will have a url property that equals this link parameter. Your app will have to do the work to analyze this url and say, "Oh, this appears to be a request to view a user's profile, so I'm going to redirect to that part of my app". It won't happen automatically.
Whether you create it when the user first signs up, or when they decide to share their profile is kinda up to you. I'm generally not a fan of pre-generating deep links ahead of time, because you might realize later you want to change an aspect of these links, and that's easier to do if you don't have thousands of pre-generated DLs. Keep in mind that either way, there is a network call required to convert these longer URls into a prettier short URL.

Registration plugin, accessing registration data

I would like to develop a website using the Facebook Registration plugin. However, I would like to see whether it is possible to avoid having to save the registration data also on the website's own database.
The application is very simple, and it seems redundant that we need to save all the user data again just so we can pick up a random registration and notify a winner.
I have no problem implementing the plugin successfully, but I cannot seem to find a way to browse the registration data either at the Facebook Apps or using Open Graph.
Anybody knows whether it is possible to browse the registration data if it hasn't been saved on a custom database?
Thanks in advance,
Jorge
Check out the "Reading the data" section of https://developers.facebook.com/docs/plugins/registration/
It says your information will come to you in the signed_request parameter.

Displaying MY public wall using AS3 without user login

I've been trying to get this to work for a while, but I've apparently missed something.
All I want is to have the latest 3 or so posts from my clients Facebook page to populate and animate in a screensaver that I am building using Flash (AS3).
So far, every time I try to bring anything in, it requires a complete oAuth login and account link, but it's only a one way exchange (read-only, absolutely no writing, posting or even linking, since it's a screensaver) I'm not even sure the client wants pictures or anything.
I am currently trying to use the facebook-actionscript-api, but there isn't an option for the "App Login" type of Authentication that would solve most of my problems.
I'm at wits end and about to have to tell my client it can't be done. At least they'll always have twitter...
I don't think it is possible to get facebook feeds without an accesstoken (even if they are public). So I guess you need to define an app within Facebook and add login stuff to your app so users can give permission to your app for basic access.
Maybe this article offers some help: http://www.adobe.com/devnet/facebook/articles/flex_fbgraph_pt1.html

Is it possible to enforce initial configuration of a page app?

I'm attempting to develop my first Facebook app that is designed to allow clients of our website to sell tickets to their events from their Facebook page as well as from our website. So when the administrator of a Facebook page adds our app as a page tab, I need to be able to find out who they are so I can load the relevant event data. There also needs to be additional include/exclude configurations and various other options, which will affect the behaviour of the app.
So my question is how is this situation best handled? When playing around with a basic sandboxed app, I seem to be able to just add the app directly to a page; there is no prompt for configuration, and I can't see any way of defining custom properties.
Is the 'edit_url' property the only way to achieve this? If so, is there a way of automatically directing the page admin to this link upon initial use?
Decoding the signed request recieved in your page will give you more insight.
From this you can retrieve page admins' UID's.
You'll need to manage the rest on your side...
In order to get the user id the user will have to grant your application basic permissions.
I'm currently doing a somewhat similar app and, just like Lix said, I used the signed_request variable to detect the page where the tab is installed. Then, based on the page's ID, I retrieve the proper content.
To also give your users an admin page, add a Page Tab Edit URL in your app configuration where you can redirect your users to a custom panel where they can edit their app.

How do I create a Facebook application for use only on page tabs?

I'm currently creating a very basic Facebook application and I've run into a bit of a roadblock, so any help would be appreciated.
My application is as follows: I want to have the application pull records from my database that the user has added to my site off of Facebook and display them in a tab on one of their fan pages. Everything the user could add or edit will be done on my site (not on/through Facebook) so all I need to do is have my application check which page is requesting and display their records. I imagine the install will go something like this: user signs up on my site, user adds app to their page, user links their account and fan page (thinking of the best way to do this), user adds records.
The problem I'm running into is there's barely any information on the new Facebook PHP-SDK (does not use the require_login() method) and I'm not really sure how to start. Again, the only functionality I need on the Facebook end is for them to be able to add my application to their fan page and be able to distinguish between which page is requesting my app.
Does anyone have any resources for creating a basic application with the new SDK? Facebook's dev section is absolutely no help for beginners and I'm pulling my hair out despite a pretty solid grounding in backend development.
Thanks!
tab apps have some limitations comparing to regular fb apps. You can read about those here.
How to make a tab - register a facebook app, fill out "Tab Name" and "Tab URL" fields in the profiles settings (you might need to fill out "canvas" settings first).
Now all tabs will be loaded from "Tab URL" on your server. How to find out who is tab owner - check for fb_sig_profile_user request parameter in your tab page handler, which contains owner's user id.
This should get you started.