I have a iframe window which displays user's flickr images. I use the flickr.photos.search api to download the user's image from flickr. This works great when the user is logged into flickr.
But when I explicitly log off the user from flickr and the yahoo network and then attempt to download the flickr images, I get redirected to www.yahoo.com in a full browser window (not in my iframe).
If I remember correctly, I did not have this issue when I was not using iframes and I was being redirected to the yahoo login screen.
Any suggestions?
To elaborate, this URI - http://www.flickr.com/services/api/auth.howto.web.html, lists the below step -
Create an auth handler
When users follow your login url, they are directed to a page on flickr.com which asks them if they want to authorize your application. This page displays your application title and description along with the logo, if you uploaded one.
When the user accepts the request, they are sent back to the Callback URL you defined in step 2. The URL will have a frob parameter added to it. For example, if your Callback URL was http://test.com/auth.php then the user might be redirected to http://test.com/auth.php?frob=185-837403740 (The frob value in this example is '185-837403740').
This does not happen when I am in my iframe window but it does happen in my full browser window.
I posted the above question in the flickr forums and I received a response which said this cannot be done in iframes. So, I would need to rejig my UI to achieve this.
Related
I am using a web browser for a ticket sales system. After I login to the system, I fill out the form to send the request for the ticket, but some problem occurs.
The browser sends the request succesfully, but when the ticket page is loading, the browser calls iframes as empty. I can't see the existence of iframes and unfortunately, iframes include the result of the request. I thought calls include the ticket, but the boss does not want it.
I want the result to be displayed in the iframe.
I just use Webbrowser1.Navigate("pageurl") for calling the request form page. After that I filled out the form and click the submit button programmatically:
WebBrowser1.Document.GetElementById("sbmtBTN").invokeMember("click");
How can I solve It
I solved the problem. Before I call the the page, Blocked main page of Iframe. I re-call the pages with their main pages and iframes run.
I am running a DNN7.1 website. I have a regular website. I added a page which acts as login page for mobile users. I am using JQuery Mobile 1.3.2 on the mobile pages including this mobile login page. If the user navigates to that page and enters username and password, it works correctly and redirects them to the correct page sent on the url using a querystring, example:
http://localhost/Mobilelogin?url=http://localhost/somePage
it correctly redirects to
http://localhost/somePage
Now I want to add capability where user can directly send his username and password along with the url that he wants to navigate, the login page should authenticate using the username and password provided and once successful redirect it to the url (using asp.net Response.Redirect method), in the format
http://localhost/Mobilelogin?u=username&p=password&url=http://localhost/somePage
The issue is, it works fine if the user is not logged in but if he is already logged in and then uses the same url, (which has username and password) redirection doesn't work. I tried disabling the ajax using following code, as I read redirection and JQM doesn't work well.
$(document).on("mobileinit", function () {
$.extend($.mobile, {
linkBindingEnabled: false,
ajaxEnabled: false
});
});
But it still is not working. Can anyone please let me know what I need to do to make this work.
I tried debugging the login module, which is written in c#, when the user enters the url when not logged in, it calls the page load and hits the break point but when logged in and enters the url the break point is never hit. It looks like browser is not even contacting the server. I am new to JQM, I thought disabling the ajax globally will always hit the server to get the information. Is that not how it works? How can I make the redirection work in my case. Any help is greatly appreciated.
You need to be aware that by default, jQuery Mobile uses AJAX to load page content and does not "redirect" as per normal.
You should read the FAQ's as these provide useful information: -
http://view.jquerymobile.com/1.3.2/dist/demos/faq/
Specifically: -
.. it will only inject the contents of the response's body element (or
more specifically the data-role="page" element, if it's provided),
meaning nothing in the head of the page will be used
http://view.jquerymobile.com/1.3.2/dist/demos/faq/scripts-and-styles-not-loading.html
This might explain why your script doesn't execute, as if it's in the <head> it's not being loaded.
When the user clicks an asp button on my page a redirect to:
https://www.facebook.com/dialog/oauth?client_id={app-id}&redirect_uri={redirect-uri}
will happen. Facebook will then redirect back to my own redirect-uri (with a code). How can I avoid that the user can see this redirect-uri and code in the address bar of the Internet Explorer browser? I think this must be possible because when I redirect to facebook and the user is already logged in then I don't see the url changing to //www.facebook.com/dialog/oauth, facebook redirects immediately back before the uri change gets visible in the address bar of ie. Don't have this issue with Firefox.
If you need to pass some URL parameters in your Facebook return URL, then you can simply do another redirect on your site's landing page to a URL without parameters after you've done the necessary checks.
Of course if you don't need any parameter then just set your FB return URL accordingly to a page without any parameter.
I have developed one Facebook Application.
In facebook, page tab url I have specified a landing url, it is landing safely no issues.
Now I want if I click on like button, it should call another landing page.
What can be best solution for this ?
What you will have to do is read the signed_request passed to your tab application.
The signed_request will contain information on whether or not the current user "liked" the page that the app is on. Once you know if the user "liked" the page or not, in the even that s/he has already liked the page, you can redirect them to whatever URL you wish.
I see you have specified asp.net of which I have no knowledge, but I can tell you that the signed_request is passed to your application as a POST request. From there you need to parse the signed request and then you can read it's contents.
Here is a simple JavaScript redirect (in PHP) -
echo "<script language=javascript>";
echo "window.location.href ='".$url."';";
echo "</script>";
I have an iframe canvas app that requires accepting of an auth dialog before use, i.e. from a browser point of view, all requests are immediately redirected to the auth dialog if the user has not already accepted them.
This means that the Facebook parser cannot read the OpenGraph tags on my page because it can never get past the authorisation point.
In a broader scale, this problem would also occur on any page that requires a login before viewing.
What would be the best way to work around this issue?
One solution I have is to check if the Organization that the client IP address belongs to is Facebook and if so let it in without authorisation, and display a page with no content except the OG tags. This is fine for robot programs access from Facebook, but what happens if an employee tries; I don't want my app to be disabled because someone from the policy team cannot properly verify the app.
As to why I need OG tags - users regularly share the link to the app and it looks bad with just a URL as the title and description and no image.
You need to allow Facebook's URL scraper to view your objects.
Best way to do this is to check for the string 'facebookexternalhit' in the useragent string. If present, return a stripped down HTML page containing the OG tags for the Facebook's scraper to read.