Authentication within page tab by redirect instead of popup - authentication

How do I redirect a user who enters a Facebook page tab that runs a Facebook application (instead of a popup to the login page of my app) and then redirect back to page tab?

Oh ok,
You need to invoke the popup on user input. If the user clicked something like "Begin Game" or whatever on the landing page, it will not get blocked by popup blockers.
It has to be in an onclick or onmouseup event etc. That will bypass popup blocking.

Related

How do I prevent a url from being displayed outside Messenger webview? e.g. directly in a browser

I'm working on an experience that should happen exclusively inside Messenger. How do I prevent an url from being displayed outside the webview. For example: user taps on 'Copy Link' and opens it in a browser.
Also, any way to disable the share button in a Messenger webview altogether?
There is no way to prevent the user from opening the link in another browser. Best you could do is detect the user agent on the page, then display an error that redirects to the bot and then resend a message with the URL button.
You can also set webview_share_button to false on the url button:
https://developers.facebook.com/docs/messenger-platform/reference/buttons/url

How to verify whether it is successfully navigating to twitter login page after clicking on twitter icon from application

I need to verify after clicking on twitter icon whether it is sucessfully navigating to twitter login page.
I used xpath:
eg: driver.findElement(By.xpath()).click
Successfull message displaying in script but twitter login page is not displaying.
It's simple,
//wait for page to load
Assert.assertEquals("Twitter",driver.getTitle().trim())
or
if(driver.getTitle().trim().equals("Twitter")){
//good job u r inside twitter
}

How to stop redirecting the url of sign up or sign in?

I have created the sign up and sign in form as popup on menu bar. When I am entering wrong credentials I am redirected to the signup page. How can I stop this redirection?

How to redirect user to login screen completely instead of opening login screen in iframe

I have two page A and B.I have put an iframe on page A.I have one link on page A.By clicking on this link I open page B in iframe.
After session expire if I click on this link , a login screen appear in iframe but I just want to redirect user to login screen completely instead of iframe.
How to achieve that.
Thanks

Facebook Connect cancel button not working

I'm using facebook connect for a little website. This is my pop-up request URL:
https://www.facebook.com/dialog/oauth?client_id=".$app_id."&redirect_uri=".urlencode($redirect_url)."&scope=email,read_stream,publish_stream,publish_checkins,offline_access,friends_checkins,user_checkins&display=popup
The problem is, I have to buttons: Login and Cancel. When I click on cancel I go back to the login page, instead of closing the window. Any ideas?
Thanks.
This is a desired behavior of OAuth Dialog no matter which button user is clicks redirection (to URL specified in redirect_uri) occurs.
Some of the reasons that window isn't closed by clicking on Cancel and additional notes:
Closing of windows not opened by script is blocked in most browsers by default.
Closing of window is a feature that require JavaScript solution and OAuth dialog URL provides ability not to rely on this.
You can use JS-SDK with FB.login which will provide this for you and will close dialog.