Java with facebook

hello
My final year uni project consists of creating a java software which will scan a facebook page and extract user information such as availabilty of pictues, address, email address, mobile number, if the profile is on private and then assess if the user is at risk, and then message them informing them that they need to remove certain information etc.
I dont have any problem with the java coding or creating an SQL database to store the results, what i need some help is the best way i can scan the users profile to extract the information such as availabilty of pictures and if the wall posts are available or not.
The way i intend to extract the email address is just simply search the info page for an "@" symbol, and if it availble, the email address will most likely be availble :)
Thanks

By "scan a facebook page" do you mean you are getting the HTML page that is displayed in the browser?
Currently Facebook has more than one way on how your profile can be viewed. Moreover, it keeps changing.
So fetching the details by scanning a Facebook page might be tricky.
I have seen (not explored) some java client APIs for Facebook. Not sure if those will help your requirement. But if feasible, that can be an easier and better alternative.

Similar Messages

  • OAM11g R2 Internet Identity Services Integration with Facebook fails

    Hi,
    I have configured OAM11g R2 to use Facebook as an Internet Identity Provider by following the steps mentioned in the link : http://docs.oracle.com/cd/E27559_01/admin.1112/e27239/oicconfiginetidentitysrvcs.htm#BEIDCHAJ
    Below are the quick steps I followed.
    Configuration :
    1. Created an App in FB to generate a Consumer Key and Consumer Secret @ https://developers.facebook.com/apps
    2. In Basic info of the App specified the "App Domains" as company.com
    3. In the App Set the "Website with Facebook Login" to http://OAM-HOST:ManagedServerPort
    4. Copied "App ID" and "App Secret"
    5. On OAM Side, Updated the Internet Identity Provider profile for FB by specifying "Consumer Key" and "Consumer Secret" with "App ID" and "App Secret" retrieved in #4
    6.a) Created an Application Profile with the same name as the registered 10g webgate partner.
    b) Used OAMServiceProviderInterface as "Service Provider Interface"
    c) Selected Facebook as "Application User Attribute Vs Internet Identity Provider User Attributes Mapping"
    d) In Application Profile Properties add property "colocated.oam" with value "true"
    7. Protected an app using webgate with OOTB OICScheme.
    8. Enable "Mobile and Social Service" form System Configuration-> Available Service
    9. Configure WebLogic Server for Facebook Identity Provider Compatibility
         a) Open the WebLogic Console.
    http://host:port/console
    b) Choose Domain > Environment > Servers > Managed Server.
    c) Click the SSL tab, then click Advanced.
    d) Click Lock and Edit configuration.
    e) Change the Host Name Verifier to None.
    f) Restart the Managed Server.
    Issue :
    1. Access the resource which is protected by OICScheme
    2. Click on Facebook
    3. Provide facebook creds
    An Error page is thrown on the browser with below exception on managed server
    <Sep 17, 2012 2:35:19 PM IST> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    <Sep 17, 2012 2:35:19 PM IST> <Error> <Net> <BEA-000903> <Failed to communicate with proxy: proxy.proxy.com/80. Will try connection graph.facebook.com/443 now.
    java.net.UnknownHostException: proxy.proxy.com
    at java.net.InetAddress.getAllByName0(InetAddress.java:1157)
    at java.net.InetAddress.getAllByName(InetAddress.java:1083)
    at java.net.InetAddress.getAllByName(InetAddress.java:1019)
    at java.net.InetAddress.getByName(InetAddress.java:969)
    at weblogic.socket.ChannelSocketFactory.createSocket(ChannelSocketFactory.java:37)
    Truncated. see log file for complete stacktrace
    <Sep 17, 2012 2:35:19 PM IST> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GeoTrust Primary Certification Authority - G3,OU=(c) 2008 GeoTrust Inc. - For authorized use only,O=GeoTrust Inc.,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.>
    java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    at java.net.Socket.connect(Socket.java:529)
    at weblogic.net.http.HttpsClient.openWrappedSSLSocket(HttpsClient.java:555)
    at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:286)
    at weblogic.net.http.HttpsClient.openServer(HttpsClient.java:363)
    at weblogic.net.http.HttpsClient.New(HttpsClient.java:518)
    at weblogic.net.http.HttpsURLConnection.connect(HttpsURLConnection.java:239)
    at oracle.security.idaas.rp.http.HttpUtils.send(HttpUtils.java:144)
    <Sep 17, 2012 2:35:22 PM IST> <Error> <oracle.idaas.rp> <BEA-000000> <There is an error while getting access token for the user from the identity provider
    oracle.security.idaas.rp.RPException: Request failed:
    at oracle.security.idaas.rp.http.HttpUtils.send(HttpUtils.java:204)
    at oracle.security.idaas.rp.oauth.provider.FacebookImpl.execHttpRequest(FacebookImpl.java:384)
    at oracle.security.idaas.rp.oauth.provider.FacebookImpl.getAccessToken(FacebookImpl.java:227)
    at oracle.security.idaas.rp.IDPResponseHandler.getAccessToken(IDPResponseHandler.java:488)
    at oracle.security.idaas.rp.IDPResponseHandler.processIDPResponse(IDPResponseHandler.java:131)
    at oracle.security.idaas.rp.RPReturnServlet.processRequest(RPReturnServlet.java:97)
    at oracle.security.idaas.rp.RPReturnServlet.doGet(RPReturnServlet.java:129)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    <Sep 17, 2012 2:35:22 PM IST> <Error> <oracle.idaas.rp> <BEA-000000> <Exception in processRequest method
    oracle.security.idaas.rp.RPException: oracle.security.idaas.rp.RPException: Request failed:
    at oracle.security.idaas.rp.oauth.provider.FacebookImpl.getAccessToken(FacebookImpl.java:247)
    at oracle.security.idaas.rp.IDPResponseHandler.getAccessToken(IDPResponseHandler.java:488)
    at oracle.security.idaas.rp.IDPResponseHandler.processIDPResponse(IDPResponseHandler.java:131)
    at oracle.security.idaas.rp.RPReturnServlet.processRequest(RPReturnServlet.java:97)
    at oracle.security.idaas.rp.RPReturnServlet.doGet(RPReturnServlet.java:129)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    Any Help/Pointers to resolve this issues will be Highly Appreciated
    ~Sagar

    Hi Sagar,
    To resolve this issue, do the following:
    1. Click on System Configuration Tab at the top.
    2. Click Mobile & Social on the Left Hand Side.
    3. Click Mobile & Social Settings.
    4. On the right hand side, you will see proxy server settings. You can remove the www-proxy.us.oracle.com from the proxy hostname and 80 from the port field.
    Let me know if you still see issues.
    Regards
    Parag

  • I have Words with Friends app on iphone and game on computer.  When I try to play with Facebook friends message says" Account Already Connected.  This Facebook account has been connected to another user."  How can I play game on iphone or my pc?

    I have Words with Friends app on my iphone4S and the same game on computer.  When I try to play Words with Friends with Facebook on the iphone the  message says" Account Already Connected.  This Facebook account has been connected to another user."  It is connected to my computer. How can I play game on iphone?

    Hi Grandmaz5,
    If you are having issues connecting to Facebook on your iPad, and you have already troubleshot the Facebook app itself, you may want to check the built-in iOS settings for Facebook; you may find the following article helpful:
    iOS: Using Facebook, Twitter, and other social network accounts
    http://support.apple.com/kb/HT5500
    Regards,
    - Brenden

  • Problem with Facebook and instagram after istalling iOS 7.1. Can not open them!

    Problem with Facebook and instagram after istalling iOS 7.1. Can not open them!

    Hi Hanjon!
    Here is an article that will help you troubleshoot these purchased apps:
    iOS: An app you installed unexpectedly quits, stops responding, or won’t open
    http://support.apple.com/kb/ts1702
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • My Friend used my pc while it was on, and cheked his Facebook account, now my pc remembers his log in information including his password. I'm trying to register with Facebook, but my pc remembers his info. I'm trying to delete this mistake. Can you help?

    A friend used my pc to check his Facebook account, and used my account. Now, my pc thinks I am he whenever I try to register with Facebook. I didn't catch the mistake until recently and have been trying to delete the info but cannot. I tried to access all of my security settings and even tried to erase the history but I don't seem to be getting anywhere. I believe he mistakenly commanded my pc to remember his username and password. I am not currently registered with Facebook, but would like to be but I am having this problem. Is it significant or not? I don't want his info crossing with mine because of my ips numbers or something like that. He also, without my knowledge, accessed his e-mail, too. His username seems to pop up even if I try to "Like" something on Facebook. This is when I noticed the problem. Then, when I tried to Register with Facebook, I was mistaken for him. The registration boxes come already filled in with his info. I do NOT want to invade his privacy. His entire profile comes up complete with friends, pictures, etc...Please help! I cannot make a 'save' disk since I don't know exactly when this happened and I've loaded new programs, including security and related files.

    I am very happy to report that my server connection tech, which I called via landline, informed me to : 1. Open Tools 2. Scan down to Clear Recent History 3. Delete All. That was it! Unbelievable! Six hours of searching through the Windows catagories. I checked the results on an internet site, and viola! It was gone! Mozilla Firefox seems to remember the usernames and passwords irregardless of the option window that asks if you if want it to remember the user and password. I finally got in touch with my friend and he said he did not answer yes to the window, even though he was aware of it. No damage. I surely do appreciate everyones' concern in this, now what seems to be, a very simple solution. Cudos to Firefox! Thank-you! P.S. I now have to enter my information at the beginning of any password protected sites...no harm done! My friend is now condemned to the 'user account' site! lol...

  • I have amny duplicate contact numbers under various names , coz when i syncronised my i phone with facebook this happened , now i want to identify them and delete  them kindly help how i can save my time

    i was using blackberry earlier and when i syncronized it with facebook and gmail it added many contacts to my phonebook leading to duplication , now i have got all thoes contacts transfered to my i phone and even downloaded appliciation to delete duplicates in i phone though it is paid application but of no use as it has not recognised the duplicate contact numbers in phonebook but it recognise only exact duplicates kindly help me how i can delete duplicate contact numbers with diffrent names

    Just go ahead and go to settings>Facebook> Contacts OFF and do the same with Gmail. THe contacts related to those acct will dissapear. Then when you sync again with Gmail be carefull BCS IT SAYS IF YOU WANT TO JUST ADD THE CONTACTS OR MERGE THEM!!!!

  • How can I sync *CURRENT* contacts with Facebook?

    I searched the discussions and found numerous questions asking how to sync Facebook's contacts with Address Book but those results just put all of Facebook's contacts in your Address Book.  I would like to sync the my current addressbook with Facebook and import user pictures, email addresses, etc.
    I'm an iPhone user all of 24 hours but this is done pretty seemlessly on Android phones.
    Is there a way of selecting just current contacts to be synced with Facebook?
    I'm using an iPhone 5 with iOS 6.1.3
    Thank you.

    I have found that syncing my contacts then un-syncing them results in my current contacts retaining all the info and picture from Facebook.  I just don't have the Facebook updates, which I'm happier about anyway.

  • Some apps no longer work with Facebook on my 5s

    Some of my apps no longer work with Facebook. They work fine on my iPod Touch but not on my 5s. Anyone know how to fix this issue?

        YoAshnish,
    Let's take a look! Verizon Wireless is not authorized to directly troubleshoot 3rd party apps, but have you tried uninstalling and reinstalling facebook?  What applications are having trouble working with Facebook?  Let us know if we can be of any further assistance.
    TrevorC_VZW
    Follow us on Twitter @VZWSupport

  • Playbook Calendar no longer synching with Facebook

    Hello, this was working before, but I deleted my facebook account from the Accounts manager ... then some days later I added it again  and it shows up within Messages and Contacts, but within the Calendar application it shows up as an option, but I do not see any birthay or event ... and if I want to create an event/appointment and want to choose the Facebook calnedar, it appears greyed-out and I can not select it..... it seems like the calendar application has a problem to communicate with Facebook ... but I do not know why...
    I have tried already a complete wipe and start from scratch, but it all comes back to the same symptom ...  everything esle is working fine....  Any clue? .... I have seen others reporting problems to sync their calendar with facebook, and it is not clear they got it back to work.
    Thanks!

    I can reproduce this bug too on OS 2.1.0.1088.
    Another thing that I noticed is that when I try to change the color of the Facebook calendar the application show the spinning thing but it never ends. I have to quit the app and when I open it again the color didn't change.
    It would be really nice if we could choose what to sync  - Contacts, Calendar, Email - from Facebook like it's possible to do with Gmail accounts.
    Cheers.
    Cheers!

  • Can' t connect Java with MySQL

    My goal is to connect Java with MySQL. I found many solutions on Internet, but I always get the same mistake:
    SQLException: No suitable driver
    SQLState: 08001
    VendorError: 0MySQL works fine alone or with php.Only thing left me to think is that the installed versions are not compatible for this mysql-connector-java-5.0.4
    I don't believe that could be a reason.
    Installed versions are:
    Apache Tomcat 5.5.20 Server
    Apache HTTP Server 2.2.4
    PHP 5.2.0
    MySQL 5.2
    jre 1.5.0_11
    jdk1.5.0_11
    Apache Tomacat JK2 connector Version: 1.2.20 File Name: mod_jk-apache-2.2.3.so
    mysql-connector-java-5.0.4
    I also set connector in class path: C:\mysql-connector-java-5.0.4;C:\mysql-connector-java-5.0.4\mysql-connector-java-5.0.4-bin.jar;C:\mysql-connector-java-5.0.4\src\com\mysql\jdbc
    For installation I used manulas from:
    http://apacheguide.org/jsp.php
    http://doc.51windows.net/mysql/?url=/MySQL/ch23s03.html
    Here is also a test code in java:
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
       public class Connect
           public static void main (String[] args)
               Connection conn = null;
               try {
        conn =
           DriverManager.getConnection("jdbc:mysql://localhost/first_test" +
                                       "user=monty&password=greatsqldb");
        // Do something with the Connection
    } catch (SQLException ex) {
        // handle any errors
        System.out.println("SQLException: " + ex.getMessage());
        System.out.println("SQLState: " + ex.getSQLState());
        System.out.println("VendorError: " + ex.getErrorCode());
       }i'm desperate, please help or tell me someone who'll know the answer.
    Thank You in advance

    hey buddy .. it seems yr code is wrong .. in getconnection () method u should also specify the port ,which u r not doing ...
    the default port for MySQL is 3306 ... see below i am giving you a sample code ... its working fine .. and dont forget to put the MySQL driver jar path in to classpath and also copy the jar into common/lib folder of your tomcat ....
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    public class MySQLConnectionTest {
         public static void main(String[] args) {
    new MySQLConnectionTest().connTest();
    public void connTest() {
              String tableName = "portfolio"; //change as per setting
              String hostName = "10.81.9.39"; // please change for the target database ip or hostname
              String dbPort = "3306"; //change if not using the default
              String dbName = "tradingsystem"; //change as per the given DB name
              String username = "root"; //change as per setting
              String password = "password"; //change as per setting
              System.out.println("before try");
              Double data=0.0;
         Double data1=0.0;
              try {
    Class.forName("org.gjt.mm.mysql.Driver");
                   System.out.println("before driver manager");
    Connection conn = DriverManager.getConnection("jdbc:mysql://"+hostName+":"+dbPort+"/"+dbName, username, password);
    String query1 = "select * from "+tableName+" where User_id='trader1' and Stock_Type='Equity'";
    System.out.println("quesry1="+query1);
    Statement stmt = conn.createStatement();
    ResultSet rs1 = stmt.executeQuery(query1);
    while(rs1.next())
         System.out.println("hiiiiii for rs1");
         System.out.println(rs1);
         Quantity=(Integer)rs1.getObject(5);
         MarketPrice=(Double) rs1.getObject(8);
         data=Quantity*MarketPrice;
         data1+=data;
         System.out.println("data1="+data1);
         i=0;
    rs1.close();
    stmt.close();
    conn.close();
    } catch (ClassNotFoundException e) {
    e.printStackTrace(System.err);
    } catch (SQLException e) {
    e.printStackTrace(System.err);
    i hope it will work for u...
    cheers,

  • How do I sync individual contacts with Facebook?

    On iOs6, on the iPhone 5, how does one sync individual contacts with Facebook? I don't wish to use the sync all contacts feature, as it adds thousands of Facebook friends to my contact list. I simply wish to connect the contacts already in my address book.

    I realize this is really old, but on the off chance of you never having found a way, I figured I'd pop in with something actually useful unlike this Raz fella.
    I couldn't figure out a way to do it without connecting to facebook at all, but here is what I did:
    1. Connect to facebook.
    2. Update contacts.
    3. Click groups and uncheck facebook contacts.
    Now contacts which are only on the phone because of facebook will not show up, and yet the others will have been connected.
    If a specific person does not connect properly to facebook, add their FACEBOOK EMAIL (found in their about section) to the email section of contacts and again go to the facebook settings and click update contacts. This should connect that person.

  • Trying to sync new account with facebook not working

    hi i have been trying to sync my spotify with facebook on my mobile but as i have already done this with previous account it wont let me and i cant seem to find any way to un sync old account any help plz thanks

    Sorry for the delay replying back.
    I suggest you contact support so they can help you
    https://www.spotify.com/about-us/contact/contact-spotify-support/
    If you get an automated reply email telling you to check the help section or the community, you need to reply back to it, even if it's from a no-reply address.
    Support usually replies within 24-48 hours.

  • My gmail crashes when I add attachment same with facebook, what can I do to fix this?

    my gmail crashes when I add attachment same with facebook, what can I do to fix this?

    That is not an Apple or OS X issue, I'd suggest contacting the modem manufacturer to see what the issue might be.

  • The domain by domain automatic save for the zoom feature in Firefox has stopped working with Facebook, is there anything I can do about this?

    I normaly use the zoom feature with Facebook in order to more easily be able to read and see. I like how the entire page zooms in. Recently, however, the zoom started reseting every time i click myself from any page on Facebook to any other. The zoom simply won't save at all, it just resets to the default value.

    Install this add-on: https://addons.mozilla.org/en-US/firefox/addon/default-fullzoom-level/<br><br>
    '''N.B.''' Several of your plugins are out of date which exposes your machine to attack. Please visit the [http://www.mozilla.com/en-US/plugincheck/ Plugins Check] page and update where necessary. <br>
    Also, update Firefox to v3.6.19 by clicking Help | Check For Updates.

  • I am having problems with Facebook.

    Two days ago we switched our internet company over from Hughes Net to Century Link. When we had Hughes Net, Facebook worked perfectly fine, other than it being slow simply because Hughes Net sucks. Now that we have Century Link, I decided to update to the newer version of Firefox. I noticed Facebook would not load properly after we changed companies, and I thought maybe it was because I needed to update Firefox, so I did that, but it didn't help at all. Every other site but Facebook and Youtube worked. When I would go to Youtube, where the video would be, would only have a black box in its place and would do nothing else for any video. Someone said I should try the secure site of Youtube, so I did and that worked. But I still cannot get Facebook to work. No matter what account I sign into, it only pulls up the top of the page (the blue strip at the top that says Account, Home, etc), and the rest of the page would be white. It won't let me click on anything dealing with the Facebook page after I log in. I'm on our main PC, which does not work with Facebook, yet it works on my sisters laptop. I've tried everything in the help section of Firefox...from clearing cookies to checking extensions and updates. Nothing works. Please help!

    There are several other Facebook apps. Each has different features. You might try a different one.
    MyPad
    Friendly
    Fera
    Quickly HD
     Cheers, Tom

Maybe you are looking for