I have a facebook App and it works.
But when users go to the app page it try to do access users base information. It asks
permission(just first time). Be able to see anyone without any question.
I wanted to make an example of this is the appropriate:
https://www.facebook.com/GKFXPhilippines/app_155718427915844
I don't want to come out the following screen;
I used MVC;
in controller page had default this line:
[FacebookAuthorize("email", "user_photos")]
I removed them and solved my problem.
Related
I'm trying to achieve FormAuthentication with multiple login pages by following this solution:
FormsAuthentication with multiple login pages
Basically the concept is to have a "middle page" that redirect you to the respective Login page of respective folder.
But I can't get this to work if I have friendly URL enabled in my application, I simply get a Redirection Loop error.
Please advise what should I do to achieve FormAuthentication with multiple login page.
P/S: I know FormAuthentication limit to have only one Login page, this is just how it being designed, a work around like the "middle page" is not a really good solution.
I been thinking to implement login myself without using FormAuthentication, but I do not have any idea how should I do it.
In one of the application I wrote previously, I store UserId in Session and use Session["LoggedIn"] = 1 to indicate the user are good to go, but I always have Session expiry issues. I know I should use Cookies but I not sure how.
if possible, just use one log-in form and use different web.config files in different directories, or one web.config with special s.
if not possible, web.config files might still help.
ex: https://support.microsoft.com/en-us/kb/316871
I had finally figure out a solution for this (perhaps a work around)
Instead of putting the Login Form inside each folder, put each Login Form in the root, then use the same concept of "middle page" and redirect them respectively.
In the Login page OnLoad function, just check if User is authenticated and have specific roles, then redirect them to the respective folder, so they wont need to signin again if they already signed in.
I have this weird problem my website won't cache the mainsite!
Here is a little overview about what I am trying to do
The first page that is being loaded is the
[DidTheUserLoggedInBefore?.html]
which checks if the user already has logged in or not depending on that result the user will be redirected to
either [LOGIN.html] or [MAINPAGE.HTML]
pretty simple!
But here comes the problem when the user restarts the app in Offline mode the App should redirect immediately to the mainpage (assuming the previous login was a success).
But that doesnt happen at all.
Instead the [DidTheUserLoggedInBefore?.html] from cache was called (which is correct) and starts loading the mainpage which isnt in cache which results in a whitescreen aka my error.
So how do I get my App to cache the Mainpage?
I've tried setting CacheSize to 100, but that didn't changed a thing :(
You can't check if the user has logged in with a .html file... You need some sort of server side language to set a cookie... Anyway this isn't much clear, is your "app" just a webview?
I couldn't let the webview cache more than 2 (simple) webpages...
WebView ignores he offline.manifest.php file too ...
I created a new website in IIS called wbsite1. Then I added an application to website1 wich is a website called website2. The problem appeared when we tried to access links in website2. The browser always refers to the root url and redirect so we were trying to change all the urls in website2. For example, if we have a url in website2 like :
<a href='http://localhost:2030/website2/cms/default.aspx...'
and we click on that link the browser redirect us to :
http://localhost:2030/website1/default.aspx
Why am I getting this behavior? And what is the best workaround to integrate two websites without trying to mess with every link in the website? Thank you very much.
We are facing troubles when I try to access a page in the child application it redirects to the default page of the main application and gives the error:
Session state is not available in this context.
I found the solution for my question and it's this :
unfortunately i have to "rewrite" all our links in my code.
so i created a function which will automatically add prefix to external links,
and store base link for other site it configuration.
I did such project with success. thank u for all your replies
i found another solution also and it's using a web proxy but i can't use it in my scenario
I'm using facebook sdk. After the user authenticates to my application, I have his 'Likes' permission.
Can I add "like" to a product page automatically?
I'm not 100% sure on what you're asking, but here is some information which may be relevant.
Requesting a 'user_likes' permission will give you access the items a user has previously liked.
In order to programatically like something, (I believe) that entity has to exist within facebook - taken from http://developers.facebook.com/docs/reference/api/
/OBJECT_ID/likes Like the given object (if it has a /likes connection)
To do this you'll have to request the 'publish_stream' permission and then do something like:
// untested!
var app = new FacebookApp();
app.Post("OBJECT_ID/likes");
Failing that you'll have to add a like button (http://developers.facebook.com/docs/reference/plugins/like/) where the user will have to click themselves
Hope that helps :)
If I understand your question correctly, you want to add like buttons to product pages on your site. You are looking for the open graph api.
http://developers.facebook.com/docs/opengraph/
i have an application and a user must log-in before he/she can access pages. now once the user logs in i keep the user details in a session variable (say Session["CurrentUser"]).
now if a user tries to jump to a page directly i will check if the Session["CurrentUser"] has a value or not...if not then the user will be directed to the login page...
my problem is that i have done this or rather say written this "Checking Code" on almost all the pages.
what i want is this code to stay on a particular location and i will just access that method all the time on all the pages...now where should i write this method ??
thank you.
You could create a class that inherits from System.Web.UI.Page and then have all your individual page classes inherit from that. Have you looked at the built in ASP.net forms authentication techniques?
You should take a look at ASP.NET Authentication. This will allow you to secure a section of your website, or individual pages via the web.config file and uses a cookie to handle authentication instead of you checking a session variable.
You could put it in a base class which extends Page, then have all your pages codebehinds extend this.
A better solution would be to use the
Application_AuthenticateRequest
pseudo event in the Global.asax. You really shouldn't be using the session either, have you looked at Forms Authentication?