mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-26 12:53:15 +00:00
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
2 changed files with 134 additions and 131 deletions
|
@ -571,6 +571,7 @@ function fbpost_post_hook(&$a,&$b) {
|
||||||
|
|
||||||
$allow_str = dbesc(implode(', ',$recipients));
|
$allow_str = dbesc(implode(', ',$recipients));
|
||||||
if($allow_str) {
|
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'");
|
$r = q("SELECT `notify` FROM `contact` WHERE `id` IN ( $allow_str ) AND `network` = 'face'");
|
||||||
if(count($r))
|
if(count($r))
|
||||||
foreach($r as $rr)
|
foreach($r as $rr)
|
||||||
|
|
|
@ -692,7 +692,7 @@ function fbsync_fetch_contact($uid, $contact, $create_user) {
|
||||||
dbesc(normalise_link($contact->url)),
|
dbesc(normalise_link($contact->url)),
|
||||||
dbesc($contact->username."@facebook.com"),
|
dbesc($contact->username."@facebook.com"),
|
||||||
dbesc("facebook::".$contact->id),
|
dbesc("facebook::".$contact->id),
|
||||||
dbesc(''),
|
dbesc($contact->id),
|
||||||
dbesc("facebook::".$contact->id),
|
dbesc("facebook::".$contact->id),
|
||||||
dbesc($contact->name),
|
dbesc($contact->name),
|
||||||
dbesc($contact->username),
|
dbesc($contact->username),
|
||||||
|
@ -764,7 +764,8 @@ function fbsync_fetch_contact($uid, $contact, $create_user) {
|
||||||
`nurl` = '%s',
|
`nurl` = '%s',
|
||||||
`addr` = '%s',
|
`addr` = '%s',
|
||||||
`name` = '%s',
|
`name` = '%s',
|
||||||
`nick` = '%s'
|
`nick` = '%s',
|
||||||
|
`notify` = '%s'
|
||||||
WHERE `id` = %d",
|
WHERE `id` = %d",
|
||||||
dbesc($photos[0]),
|
dbesc($photos[0]),
|
||||||
dbesc($photos[1]),
|
dbesc($photos[1]),
|
||||||
|
@ -777,6 +778,7 @@ function fbsync_fetch_contact($uid, $contact, $create_user) {
|
||||||
dbesc($contact->username."@facebook.com"),
|
dbesc($contact->username."@facebook.com"),
|
||||||
dbesc($contact->name),
|
dbesc($contact->name),
|
||||||
dbesc($contact->username),
|
dbesc($contact->username),
|
||||||
|
dbesc($contact->id),
|
||||||
intval($r[0]['id'])
|
intval($r[0]['id'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue