How can I capture user's last login and display the next time they login to the website in XPages? - authentication

I am working on developing a custom user portal using XPages. I would like to capture a user's last login/signin information and display it on the portal when the user logs in on the banner page.
Does anyone know how I can accomplish this for an XPages app?
Any help or insight into this is greatly appreciated.
Thank you!
Shabana.
My Portal Link: http://bit.ly/OJmanJ

I do this with a User document and just save the information of the last login there. Then I set a flag in sessionScope to know that I saved it already.

I don't think this information is logged automatically anywhere. So you need to log it yourself and then display this logged information on your portal.

Related

Facebook likebox and like button not showing

I am using facebook likebox.
It is working fine.
When user set him/her profile as facebook page then it is not working.
It's not possible for page. and we cant do that it's only for user profile funtionality.
Happy coding :)

Adobe CQ. Restrict access to site with login/password popup window

I've faced with a problem. I wanna to show user the popup window when he enters my site. I mean, only specific group of users are able to visit it. How can i do it with CQ? I have investigated alot, but still nothing works. I was thinking to do it with the help of Day CQ HTTP Header Authentication Handler. I added specific path in it's config but nothing changed. Now I am trying to write my own login service. Can you help with ideas? Maybe there is something I have missed? Thank you.
First, you need a Closed User Group on the publish instance.
Second, you need to determine if you need a popup instead of initial page load, or load a default page that runs JavaScript to create the popup if the user doesn't have an active session.

OAuth access_token request -> forbidden

Yesterday I wanted to get an access_token from my account, tried several websites, every time I tried it I got a white page with "Forbidden".
Does Instagram lock the API Access from User?
Thanks
I didn't have any problem, using oauth.io with a simple Instagram connect:
OAuth.popup("instagram", function(e,r) {
if (e) {
$('#results').html('error: ' + JSON.stringify(e));
return
}
$('#results').html('result from instragram: ' + JSON.stringify(r));
});
You can try directly on http://jsfiddle.net/bumpmann/4Ef8p/ and it should reply something like:
{"access_token":"...","user": {"username":"...","bio":"...","website":"...","profile_picture":"http://images.ak.instagram.com/profiles/...","full_name":"...","id":"123456789"}}
If you don't get that, you have most likely a problem with your Instagram account (or your environment if it works on another device)
here is the solution
login to your instagram account from pc browser
go to Edit Profile
change some of your profile info. example: add or delete some text to Bio
Click submit. a new screen will apear which show you a security picture type the text from picture.
after that you will be able to get access token.
You got "forbidden" because of new instagram "captcha" feature. I cannot still find any official information about it, but if user passes captcha on his mobile, authorization will work again.
For the people those don't understand.
Just go to instagram and reset your password than you will see the captcha.
After filling this in you can retreve the acces token with your application

Why is my connect with facebook on my site not working?

When I click on the login button on http://www.coupean.com/user/login
I get an error.
What am i doing wrong to setup in Facebook App?
Do I need to touch anything on Open Graph?
When I want to submit the "like' action it always gives me this message:
No Aggregations created for this Action Type. Please create a completed Aggregation populated with sample data before submitting for review.
so i set up the aggregation...
but I do not know what this actually means and if i am doing them right.
![enter image description here][4]
How can we make the login work? Could you please provide a detailed explanation?
I cannot post up images here so:
please go to
http://www.coupean.com/images/s1.png
http://www.coupean.com/images/s2.png
and s3.png and s4.png under the same root url
https://www.facebook.com/dialog/permissions.request?api_key=APP_ID&app_id=APP_ID&...
You obviously need to insert your app's app ID and API key...
Additionally you now need to reset your app secret since you just made it public in one of your screenshots.

Facebook API: Get basic user info

I have a Facebook app that displays content without requiring any authorization from the visitor.
I wish to display the visitor a welcome message ("Hello {USER_NAME}"), but without requiring authorization.
I'm using an iframe, but I can switch to fbml for this.
I'm okay with this only working for the canvas page (http://{MY_DOMAIN}.com/{APP_PAGE}) and not for the page inside facebook (http://app.facebook.com/{APP_PAGE}).
How can this be done?
Any help would be greatly appreciated.
Dorian
You definitely can't do this with iframe. I'm not sure about fbml, but you can give it a shot by using an fb:name tag and seeing if it renders for anonymous users.