[ https://issues.apache.org/jira/browse/CB-2422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shazron Abdullah reassigned CB-2422: ------------------------------------ Assignee: (was: Shazron Abdullah) > iOS 6 Facebook Linked Contact Problem. > -------------------------------------- > > Key: CB-2422 > URL: https://issues.apache.org/jira/browse/CB-2422 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Environment: Present on iOS 6. > I'm using Phonegap 2.2.0. > Reporter: Michael Marchment > Labels: contacts, facebook, ios, ios6 > > I've just written an app that uses the (undocumented) > "navigator.contacts.chooseContact", which when a contact was selected, would > pull their id, displayName & phoneNumbers and arrange them nicely into a > table -- BUT! I started to realise that I wasn't adding every contact. > "console.log(contacts.length + " contact(s) found");" would tell me a contact > was there and that there is a contact being chosen, it just (for whatever > reason) chooses to ignore the phone numbers and spit out an error. If I > remove "for (var j=0; j<contacts[i].phoneNumbers.length; j++) {" and any > reference to calling, say, "contactsPhoneNumber = > contacts[i].phoneNumbers[j].value;" and calling "contactsPhoneNumber", the > function will work! (Code is identical to that in the Phonegap documentation) > The issue happens when a contact is automatically linked with Facebook. > Facebook doesn't always syc phone numbers to the contact as some people don't > put them up, but it will syc it with contacts with matching names to friends > in your address book. > For instance, my sister's name is Jessica in my address book but her Facebook > name is Jesska so there are 2 contacts in my address book. Phonegap will only > insert Jessica, not Jesska even though both have the same phone number. > Using native code is not my forte, so I thought I might just bring this up > here and see if people are having troubles with phone numbers when doing the > same thing and perhaps someone who knows native code well could come up with > a solution for the next release of Phonegap... If you follow :) > Thanks all, > Michael. > Update: After writing all of this out and double checking to see if it > worked, iOS put back in all of the facebook info. I just deleted the linked > facebook contact permanently and it worked for that contact again. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira