Skip to content

Commit

Permalink
facebook tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
voitto committed Apr 12, 2010
1 parent 01ccb4b commit 7b2fb18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
23 changes: 1 addition & 22 deletions app/omb/plugins/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -1099,27 +1099,6 @@ function facebook_login( &$vars ) {
$cfg->set_etag();
}

$fb_can_offline = profile_setting('fb_can_upload');

if (!$fb_can_offline) {
$fs->VerifyPerm($_SESSION['fb_userid'],'offline_access');
update_option('fb_can_offline',true);
}

$fb_can_tweet = profile_setting('fb_can_tweet');

if (!$fb_can_tweet) {
$result = $fs->VerifyUpdate($_SESSION['fb_userid']);
update_option('fb_can_tweet',true);
}

$fb_can_upload = profile_setting('fb_can_upload');

if (!$fb_can_upload) {
$fs->VerifyPerm($_SESSION['fb_userid'],'photo_upload');
update_option('fb_can_upload',true);
}

$_SESSION['fb_person_id'] = $i->person_id;

if (isset($_SESSION['fb_forward']))
Expand Down Expand Up @@ -1618,7 +1597,7 @@ function facebook_timeline(&$vars){
// $access_token = $db->result_value($result,0,'oauth_key');

$fs = new FacebookStream($consumer_key,$consumer_secret,$agent,$app_id);
$fs->VerifyPerm($userid,'offline_access');
$fs->verifyPerms($userid,'offline_access');

$hash = md5("app_id=".$appid."session_key=".$sesskey."source_id=".$userid.$fs->getApiSecret());

Expand Down
8 changes: 5 additions & 3 deletions db/library/remy-tweed/cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,11 @@
} elseif (substr($options[0],9,13) == 'importtwitter') {
// do twitter
// http://abrah.am

global $prefix;
$prefix = $microblog->value."_";
$db->prefix = $prefix;

lib_include('twitteroauth');
// look for a twitter user
global $db;
Expand Down Expand Up @@ -579,9 +584,6 @@
$table = 'posts';
$content_type = 'text/html';

global $prefix;
$prefix = $microblog->value."_";
$db->prefix = $prefix;

$rec = $Post->base();
$fields = $Post->fields_from_request($request);
Expand Down

0 comments on commit 7b2fb18

Please sign in to comment.