User specific redirect on login, in Joomla - redirect

I'm looking for a way to redirect each user that logs in to a different page. I do photography and want my clients to be able to log in then be redirected to a page that displays their pictures only. Additionally, that specific user will be the only one to be able to view that page. I know you can redirect all users after logging in to a specific page and hide certain content from those not logged in but that is not what I'm looking for... it needs to be user specific. I'm new to Joomla and looking for a way to achieve this.

If you install FLEXIcontent CCK and use that for content creation -
it enables you to set up individual pages per user:
http://www.flexicontent.org/forum/index.php?f=20&t=6762&rb_v=viewtopic
http://www.flexicontent.org/forum/index.php?f=20&t=6132&rb_v=viewtopic

In case anyone else is looking for how I solved this...
I did some research on this and came across a plugin called Phoca Gallery. It doesn't redirect the user to a specific page but rather lets you set viewing rights to specific users. So I created a "Client Page" that only shows to registered users (i.e. when someone is login in) and have the joomla login module redirect all users to that page after login.
Now on my "Client Page" I have the phoca gallery module set to only show albums that the user has rights to. A good work around for what I needed. It even lets you add watermarks to your images... a good bonus... and an even better bonus... It's free!
Find it here: http://www.phoca.cz/phocagallery

Related

Can facebook API do this?

On my site I want members to be able to click a link import your Facebook photo then a Facebook popup opens and asks user to confirm that he/she wants to share their profile picture with my website.
Can this be done? What are the steps? I am looking at the Facebook graph API but I am unsure if this is the right thing, I have huge problems understanding their samples and "help" files.
I was able to easily do this with Gmail and Yahoo, uses can get a browser popup from them in order to confirm sharing contacts with my website, I assumed Facebook works the same to import the profile picture but I am spinning in circles.
Within Facebook Terms for users it states that your name and picture are publicly available so one does not need permission to request it.
https://www.facebook.com/about/privacy/your-info
The naitik call is an example of data that is publicly available without asking for permission.
When you are requesting the current user, that is, you don't know the id or name beforehand, then you use a basic login flow which will then present one of the following dialogs.

Is this possible to require website visitor to fan a facebook page to access content on the website?

I was wonder if this would be possible and how to do it. I have a personal website. I wanted to have it so that in order for the visitor to gain access to a specific page,the website checks to see if that visitor is a fan of our page on facebook. If they are not, they must become one to advance to the page content on my website. I thought perhaps there is a code that would do this? Maybe some kind of token/cookie combo? Any help would be great. Iv been searching for a solution to this. The page on my personal site gets a lot of traffic so I want to require all visitors to that page to become a facebook fan and the site verifies this before letting them into the page.
Outside of Facebook you can only check if a user likes your page if you have the user login to your site first.
So you’d need to set up an app, have the user login, ask for their permission to read their likes, read the info if they like your particular page – and then either let them see the content, or present them with a like button.
How it’s done in detail is all in the docs – so please have a look around there if you think it’s worth the cost.

Hide a Facebook tab based on user's location

We're developing a Canvas app that will have a tab when implemented on the fan page. The Tab will have the like gate. What we want to do, is restrict access based on location. So, Facebook users outside of the US wouldn't see the tab when the go the fan page.
This blog posts speaks to showing users different content based on location (http://developers.facebook.com/blog/post/394), but i don't want them to see the tab at all.
Any thoughts?
To set demographic restrictions (i.e., location, age, etc.) issue an HTTP POST with an app access token to
https://graph.facebook.com/APP_ID?restrictions={“RESTRICTION_TYPE:VALUE”, …}
ie:
https://graph.facebook.com/APP_ID?restrictions={"location":"US"}
Users who do not pass the restrictions will not see the tab.
More information at: Facebook Developer Blog & Graph API: Application.
When an application is accessed as a Tab on a Page (iFrame) Facebook Passes a signed request (http://developers.facebook.com/docs/authentication/signed_request). You would be able to use that data to get the user's location. However, it might need further authentication to get that information.
Please refer to this question for a hack to find the user location through their IP:
Getting user location on Facebook page tab
Anyway, as far as I know, you cannot remove the application all together, you have to show up 'some content' for the users who load the tab. I suggest that if you want to restrict page content to use the country restriction for the entire page. However, it might be impractical for your use case.

Facebook page apps - Authorizing a user

I can't seem to find exactly what I'm looking for. We're trying to build an app to run solely on a Facebook Page. We want to show a landing page if they don't Like the page, and the contest entry form if they do. This functionality works.
Before showing the contest entry form, we'd like to authenticate the user viewing the app so that they can just hit "Enter the contest!" and we can automatically pull a name/email address.
Any of the methods of authentication I've seen described, including through the Facebook Developer docs, don't work at all.
I saw something that said they need to interact with the app first, then you can get the id, but that doesn't work either. I also don't get the page id passed with the signed request.
Its also pretty unclear whether I should be using an iframe or just FBML.
Could anyone point me in the right direction, please? Thanks!
You need to create a fan page and add the FBML plugin to that page, then you will need to insert a short code that will determine if a facebook user has clicked 'Like' or not and by determining that you will decide weather to display the content of the landing page or not (using an iframe). You will probably like to also set the FBML box that you create as the default view for members who didn't press the 'Like' button yet, you can change the default view in your fan page settings.
On the iframe, you will need to use the Facebook API if you want to retrieve any user information from Facebook, for that, you will need to register a new application with Facebook. Go to developers.facebook.com for the API integration and app registration.
Also, what do you mean when you say:
Any of the methods of authentication
I've seen described, including through
the Facebook Developer docs, don't
work at all.
Well, it appears you can't do it that way. The client was very specific in wanting that functionality but we ended up convincing them to go for a redirect to the canvas page to have the app authorized and the contest entered instead.

post content to facebook to users' wall?

i've built a survey and at the end i want the users to share their result on their facebook wall but i'm finding it hard to find any examples or reference.
something like;
<div>
[ image/graphic ]
"I've just completed survey XXX and got 90%"
<a>post on my wall</a>
</div>
any help appreciated - even if its just terminology i can look up!
Start here. Basically, you're creating a website which you want to integrate into Facebook. To do so, your users will need to "login to Facebook" from your site (unless they're already logged in, such as in another browser tab) and allow your site to perform certain actions on Facebook on their behalf.
The Single Sign-On part is where you will initialize your website as a Facebook application (you'll need to create the application on Facebook first) and provide a login button for your users.
Your login button can be set up to ask the user for specific permissions to act on their behalf with Facebook. I think the one you want is publish-stream but I'm only barely familiar with it, play around with the functionality and see what works best for you. Your users will be presented with a pop-up div stating that your website (or application) is requesting these specific permissions and they have the option to allow or deny. An example can be seen here.
Once you have the user's permission, you make use of the cookie (demonstrated using PHP back on the Single Sign-On link) to gain access to information by use of the Graph API, the JavaScript SDK, Social Plugins, etc.
you should use the facebook api.
Get the "publish_stream" right of a user and use the "api" method of the connection object (with parameters like : '/userid/feed', 'post', array of informations about the post).
I can't find the right code and the official document is not always up-to-date.
OR
Just add a facebook "share" button on your page that uses "meta" markups. You should find examples on about 80% of websites.