it seems that you can’t delete social profiles with AppleScript in Lion.
I tried (hopefully) every possible syntax.
Last try was
tell application "Address Book"
repeat with p in every person
repeat with i from 1 to (count social profiles of p)
if url of social profile i of p contains "https://www.facebook.com/profile.php" then
set profilID to id of social profile i of p
delete (1st social profile of p whose id is profilID)
end if
end repeat
end repeat
end tell
if you google for docs on tools for Address book at Apple Developer, tjem I guess something usable will show up, as the addressbook is used on their servers, as a centralized solution for contact managment, for their customers. So I guess, or think it is an admin tool for addressbook, and that may help you. But I guarantee zip!
Indeed it’s possible to manage all properties and elements with Objective-C but as the sample projects are created with pre-10.7 environment, none of the sample code provides access to the social profiles element.
As a workaround this script adds the people with a Facebook profile to a new group “facebook” in Address Book,
then you could delete the profiles manually
tell application "Address Book"
set filteredPeople to every person whose service name of social profiles contains "facebook.com"
make new group with properties {name:"facebook"}
repeat with aPerson in filteredPeople
add aPerson to group "facebook"
end repeat
save
end tell
Does that mean that all cards with facebook.com are being moved to the “Facebook” group and I will have to manually bring them back to their original groups ?
I dont know if this helps or not. The values you’re looking at are in the class “ABMultiValue”. They won’t be referenced by a single Applescript descriptor. You’ll need to get the group (array) of items in the class ABMultiValue, then iterate through each item for each person record, looking for the value of the item. Then use “ removeValueAndLabelAtIndex: This might need to occur in ObjC.
StefanK, I think you are on the right track. Check out the XCode docs for ABMultiValue Class Reference
Someone said suggested the following in another forum:
tell application “Address Book”
repeat with thisPerson in people
set FBSocialProfiles to (every social profile of thisPerson whose service name contains “Facebook”)
if FBSocialProfiles ≠{} then
– has a facebook profile
add thisPerson to group “facebook”
end if
end repeat
save
end tell
On second thought, this might be somewhat faster. or it might not be. 
tell application “Address Book”
set FBSocialProfiles to (every person whose social profiles’s service name contains “Facebook”)
repeat with thisPerson in FBSocialProfile
add FBSocialProfiles to group “facebook”
end repeat
end tell
Finally got this to work through some trial and error - not perfect by any stretch, but it does work. You can replace “Facebook” with the name of any other social network and it will remove those too. Apparently if you delete the url and user name, it will also nuke the whole social profile. Enjoy!
tell application "Address Book"
repeat with thisPerson in people
set SocialProfileList to (every social profile of thisPerson whose service name contains "Facebook")
if SocialProfileList ≠{} then
-- has a social profile
delete (url of every social profile of thisPerson)
delete (user name of social profile of thisPerson)
end if
end repeat
save
end tell