forked from friendica/friendica-addons
fbsync/fbpost: postings to selected facebook addresses now work. (will work for new contacts and step by step for old contacts)
This commit is contained in:
parent
81e05e6274
commit
2ee50af605
|
@ -571,6 +571,7 @@ function fbpost_post_hook(&$a,&$b) {
|
|||
|
||||
$allow_str = dbesc(implode(', ',$recipients));
|
||||
if($allow_str) {
|
||||
logger("fbpost_post_hook: private post to: ".$allow_str, LOGGER_DEBUG);
|
||||
$r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'");
|
||||
if(count($r))
|
||||
foreach($r as $rr)
|
||||
|
|
|
@ -692,7 +692,7 @@ function fbsync_fetch_contact($uid, $contact, $create_user) {
|
|||
dbesc(normalise_link($contact->url)),
|
||||
dbesc($contact->username."@facebook.com"),
|
||||
dbesc("facebook::".$contact->id),
|
||||
dbesc(''),
|
||||
dbesc($contact->id),
|
||||
dbesc("facebook::".$contact->id),
|
||||
dbesc($contact->name),
|
||||
dbesc($contact->username),
|
||||
|
@ -764,7 +764,8 @@ function fbsync_fetch_contact($uid, $contact, $create_user) {
|
|||
`nurl` = '%s',
|
||||
`addr` = '%s',
|
||||
`name` = '%s',
|
||||
`nick` = '%s'
|
||||
`nick` = '%s',
|
||||
`notify` = '%s'
|
||||
WHERE `id` = %d",
|
||||
dbesc($photos[0]),
|
||||
dbesc($photos[1]),
|
||||
|
@ -777,6 +778,7 @@ function fbsync_fetch_contact($uid, $contact, $create_user) {
|
|||
dbesc($contact->username."@facebook.com"),
|
||||
dbesc($contact->name),
|
||||
dbesc($contact->username),
|
||||
dbesc($contact->id),
|
||||
intval($r[0]['id'])
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue