1. Download our Official Android App: Forums for Android!

Fix for facebook contact syncing with 3rd party apps

Discussion in 'Android Devices' started by shawn222, Sep 29, 2011.

  1. shawn222

    shawn222 Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    34
    Joined:
    Aug 24, 2011

    Aug 24, 2011
    34
    0
    15
    For contacts synced through facebook, 3rd party apps can't access the facebook contact info. This thread has a fix for this: WORKING FIX: facebook contact info in 3rd-party apps (including pics) ROOT REQUIRED - xda-developers

    Basically, from what I gather, facebook sets up it's information with a restricted flag that only lets system level apps access it and the following sql statement (from the linked thread) removes the restriction on current and future facebook contacts

    Code (Text):
    1. adb shell sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "CREATE TRIGGER unrestrict_new_data AFTER INSERT ON raw_contacts BEGIN UPDATE raw_contacts SET is_restricted=0 WHERE _id=NEW._id and NEW.is_restricted!=0 and NEW.account_type in ('com.facebook.auth.login'); END; CREATE TRIGGER unrestrict_updated_data AFTER UPDATE OF is_restricted ON raw_contacts BEGIN UPDATE raw_contacts SET is_restricted=0 WHERE _id=NEW._id and NEW.is_restricted!=0 and NEW.account_type in ('com.facebook.auth.login'); END; UPDATE raw_contacts SET is_restricted=0 WHERE is_restricted!=0 AND account_type in ('com.facebook.auth.login');"
    This command is meant to be ran in a command window on a computer but can also be ran from within a terminal app on the device itself by removing adb shell

    The SGS2 though, seems like it doesn't have sqlite3 as I get an error that sqlite3 is not found when trying to execute this statement.

    I'm wondering if anyone has seen this, been able to execute it on an SGS2, or has any ideas of approaches which could be taken to make this work.

    Shawn
     

    Advertisement

  2. shawn222

    shawn222 Member
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    34
    Joined:
    Aug 24, 2011

    Aug 24, 2011
    34
    0
    15
    I was able to get this working using a combination of aShell and aSQLiteManager to execute the commands.

    Now 3rd part apps like GO sms Pro can access all facebook contacts!
     

Share This Page

Loading...