I am trying to get html code of specific page in facebook but the problem is that my code gives me the html of no-user in facebook.
String html = Jsoup.connect("https://www.facebook.com/mor.amit.3/about").get().html();
System.out.println(html);
For example when i try to do it, it gives me her page but from side of no-facebook user.
how can i use this code and look on her profile from user side?
you can't get birthday ,education or some specific information without login to facebook because of privacy settings of Facebook user.for example if you logout from fb and view that profile .you will get this .so there is no information about birthday .you have to log to fb using java then you will be able to download expected page
Related
In my scenario, I've web page without any login panel. (i-e there's no account dashboard, usually other sites have at top right corner with user profile picture/name).
I've an email input field to enter email. And my page checks and shows a login button only if email is already registered in our database.
Then user logged in with his email and password, my page refreshes once with only some DOM changes and get user logged in to our system.
I'm running automation at 2 pages before this, but stucked here at 3rd page. I need to check this by browser cache/cookies because I havn't any other new element appeared at page.
Please help me. Is this possible to do? If not, then is there any other way to check this?
Thanks in advance to the responses.
I am using:
ChromeDriver 77.0.3865.40
Eclipse Version: 2019-06 (4.12.0) with Java
You don't need cookies in this case. Instead, you should property design your test case.
Before starting the browser, cookies should be cleared. Then you start your test, simulate normal login. Then navigate to the needed page. Now you know that the user was logged in and you know what to expect in your test.
I'm going to make an Android app for my university that in my app's login page the user or student could type his/her student code and student password and by clicking "log in" the app takes him/her to his/her own portal on website!
I've watched many tutorials but all of them used JSON Parsing.
Our university website doesn't have JSON file so I want to try to connect to HTML code of log in page straightly and by the way university won't let me to connect to website database.
Basically I just want to know how to connect my app's login page to that login class of website HTML code!
Here is the webpage, you can see what I said here by just right clicking and selecting "view page source" in chrome:
http://puya.toos.ac.ir/gateway/PuyaAuthenticate.php
What you can do is , call the same page as you call http get service after getting the response , parse the html response.
For this specific case , you can login and track the script being called for login post request , call the same script by posting the required data as http post service . After authentication parse same result . Basically you will do all the parsing which browser do for you , and you have to present parsed data in meaning full manner .
You can also use webview for easy parsing and presentation.
Simulate your request by tracing every step of your website.
This is a newbie question in HtmlUnit. I have used the code I found on this question to log into LinkedIn, but when I open the page with Chrome the current user is logged out. Can I check if I have indeed logged in the site?
In general the content of the page somehow changes, when you are logged in.
So you could simply log the source of the page after you logged in.
(If ajax is used on the page, you need to wait some time so that the javascript can modify the page)
use the .toXml()-method to get the html source. You can also save this in a file e.g. t.html and open it in a browser (active content and css will most probably not work, but you can still see enough in most cases to determine, if login worked or what is on the page after the login).
I am working on a GWT project and trying to use Facebook login in our website. GWT has a feature to create history through history the hash token thing(#). The urls we create our like www.example.com/#!signin to make it crawlable.
PROBLEM :-
Few months before Facebook developer console doesn't ask for the
REDIRECT URL It used to work with the redirect url that was given in
the code in the same format like above url.
But the issue is its now asking on the developer console in the
facebook login setting.
The normal testing project are working fine with the urls without #!
but the url like www.example.com/#!signin are not working. Can't understand the problem.
I have just replaced the redirect url with the one with a hash token(#!)
Problem solved. For Facebook login we don't need to give the tokens of the url in the redirect uri of Facebook developer console. We can just put the root address like only www.example.com/ .After that the Code will check through the history listener class. We have to give the token of the redirect class in the code to create the url .
I'm developing a Dynamic web Project in java, and the goal is upon click on button to fetch the "ITERATION BURNDOWN" graph from https://rally1.rallydev.com.
my question is do i have to know the rally api in order to get this content or just to go to the appropriate url and search there the graph?
i login successfully to the rally (used this link for the login: http://www.mkyong.com/java/how-to-automate-login-a-website-java-example/).
after i login successfully i couldn't get the url with the graph. it's just returning the landing page content.
pls help,
Thanks
I assume that you refer to IterationBurndown on Reports>Reports page, which is served by a legacy analytics engine.
To get the appropriate URL you may need to install IterationBurndown report wrapped in an app from AppCatalog on a custom page in Rally. I cannot confirm a java scenario, but the URL of that custom page can be used with javascript, by making an html file with this custom page embedded using iframe, for example:
iframe.src = "https://rally1.rallydev.com/#/12345d/custom/6789";
The steps are:
create a custom page
install IterationBurndown report from the AppCatalog as an app.
At least in the javascript app case, the URL to IterationBurndown on Reports page will not work for this purpose, hence the extra step of using a custom page.
When you say that you get a landing page, I am not sure if you are referring to login page or home page. If it is the former, it means authentication has not been handled. Legacy IterationBurndown report wrapped in an app will not work with newer ApiKey. That's too bad because ApiKey, unlike LoginKey, works with Java as well, unlike the legacy LoginKey which works in the browser (with html/javascript apps) only.