Difference between revisions of "Facebook"

From Organic Design wiki
(extension config info)
(See also: The Encryption Debate Is Over - Dead At The Hands Of Facebook)
(40 intermediate revisions by 2 users not shown)
Line 1: Line 1:
I'm doing a job that requires a MediaWiki to post recentchanges to facebook wall. I started with [http://nocturnsoft.com/devblog/?p=1745 wall posts with the facebook PHP SDK], which I got working ok, except for one difference which is that the siteURL is now set from the "website" section of "Select how your app integrates with Facebook" in the "edit App" screen.
+
{{quote|Whenever you log into Facebook, there are millions of posts the platform could show you. The key to its business model is the use of algorithms, driven by individual user data, to show you stuff you’re more likely to react to. Wikipedia defines an algorithm as “a set of rules that precisely defines a sequence of operations.” Algorithms appear value neutral, but the platforms’ algorithms are actually designed with a specific value in mind: maximum share of attention, which optimizes profits. They do this by sucking up and analyzing your data, using it to predict what will cause you to react most strongly, and then giving you more of that.
  
Here's the post that my test script did:
+
Algorithms that maximize attention give an advantage to negative messages. People tend to react more to inputs that land low on the brainstem. Fear and anger produce a lot more engagement and sharing than joy. The result is that the algorithms favor sensational content over substance. Of course, this has always been true for media; hence the old news adage “If it bleeds, it leads.” But for mass media, this was constrained by one-size-fits-all content and by the limitations of delivery platforms. Not so for internet platforms on smartphones. They have created billions of individual channels, each of which can be pushed further into negativity and extremism without the risk of alienating other audience members. To the contrary: the platforms help people self-segregate into like-minded filter bubbles, reducing the risk of exposure to challenging ideas.|[https://washingtonmonthly.com/people/roger-mcnamee/ Roger McNamee] from [https://washingtonmonthly.com/magazine/january-february-march-2018/how-to-fix-facebook-before-it-fixes-us/ How to Fix Facebook Before It Fixes Us]}}
 
 
{| style="margin-left:50px;border: 1px solid #ccc"
 
|-
 
|[[File:Facebook-wall-post.png]]
 
|}
 
  
 
== Logging in to the wiki with Facebook account ==
 
== Logging in to the wiki with Facebook account ==
Line 18: Line 13:
 
|}
 
|}
  
*See info about the extension configuration [http://fbconnect4mw.svn.sourceforge.net/viewvc/fbconnect4mw/trunk/Facebook/config.default.php?view=markup here].
+
*See info about the extension configuration [https://github.com/garbear/facebook-mediawiki here].
 +
*Sometimes during testing and deleting apps and users etc, a user becomes corrupted and can't login properly anymore. To fix this, delete everything in the Facebook database table with '''delete * from wiki_user_fbconnect;'''
 +
 
 +
== Posting wiki changes to the users wall ==
 +
I started with [http://nocturnsoft.com/devblog/?p=1745 wall posts with the facebook PHP SDK], which I got working ok, except for one difference which is that the siteURL is now set from the "website" section of "Select how your app integrates with Facebook" in the "edit App" screen.
 +
 
 +
Here's the post that my test script did:
 +
{| style="margin-left:50px;border: 1px solid #ccc"
 +
|-
 +
|[[File:Facebook-wall-post.png]]
 +
|}
 +
 
 +
I got that working with the following settings:
 +
<source lang="php">
 +
$wgDefaultUserOptions['rememberpassword'] = true;
 +
//$wgFbDisableLogin = true;
 +
$wgFbUseRealName = true;
 +
$wgFbEnablePushToFacebook = true;
 +
$wgEnableArticleCommentsExt = true;
 +
$wgFbPushEventClasses[] = 'FBPush_OnArticleComment';
 +
include("$IP/extensions/Facebook/FacebookPushEvent.php");
 +
include("$IP/extensions/Facebook/pushEvents/FBPush_OnArticleComment.php");
 +
</source>
 +
 
 +
But there seems to be something wrong with the preferences and I had to comment out a condition in '''FacebookPushEvent.php''' on line '''169''':
 +
<source lang="php">
 +
if( !$wgUser->getOption( self::$PREF_TO_DISABLE_ALL ) ) {
 +
//      if( $wgUser->getOption( $prefName ) ) {
 +
            $pushObj->init();
 +
//      }
 +
    }
 +
</source>
 +
Further investigation shows that the problem is due to the ''up_properties'' field of the ''user_properties'' table is of type ''varbinary(32)'' so is truncated to 32 characters.
 +
 
 +
== Embedding the wiki in the Facebook Canvas ==
 +
I've got the wiki to embed in the canvas using the Facebook application settings shown below, but for some reason many of the links such as RecentChanges or editing a page return a blank screen while others work ok. Since October 1<sup>st</sup> the embedded application must be an HTTPS connection, but a self-signed certificate is accepted so this is not a big problem.
 +
 
 +
[[File:Facebook-app-settings.png]]
 +
 
 +
[[File:Mediawiki-in-facebook-canvas.jpg|743px]]
 +
 
 +
== See also ==
 +
*[https://web.facebook.com/help/community/question/?id=266735870194105 Disabling paste into comments?! seriously???]
 +
*[http://developer.practicalecommerce.com/articles/2953-How-to-Embed-Facebook-Wall-Content-on-Any-Site How to Embed Facebook Wall Content On Any Site]
 +
*[http://socialfixer.com/ Social Fixer] ''- and excellent browser plugin to configure FB how you want it!''
 +
*[http://www.youtube.com/watch?v=Rx3z_OkAdfU Facebook click fraud exposed]
 +
*[https://medium.com/the-mission/the-enemy-in-our-feeds-e86511488de How Your Fear and Outrage Are Being Sold for Profit] ''- the story of how one metric has changed the way you see the world''
 +
*[https://medium.com/@IsaacSimpson/how-leaving-social-media-affects-your-mind-c9e22df2c354 How leaving social media affects your mind]
 +
*[https://washingtonmonthly.com/magazine/january-february-march-2018/how-to-fix-facebook-before-it-fixes-us/ How to Fix Facebook Before It Fixes Us] ''- an early investor explains why the social media platform’s business model is such a threat—and what to do about it.''
 +
*[https://www.wired.com/story/whatsapp-security-flaws-encryption-group-chats/ WhatsApp encryption bypassed by server administrators]
 +
*[https://www.wired.com/story/how-to-turn-off-facebook-face-recognition-features Facebook and biometric data]
 +
*[https://libertyblitzkrieg.com/2018/08/13/censorship-is-what-happens-when-powerful-people-get-scared/ Censorship Is What Happens When Powerful People Get Scared] ''- Stamos says Facebook will stick to amassing digital evidence and turning it over to authorities''
 +
*[https://www.wired.com/story/facebook-security-breach-third-party-sites/ 50 Million FB account pwned]
 +
*[https://www.vpnmentor.com/blog/how-to-delete-your-facebook-account-really-update/ How to delete your account] (see also [https://www.businessinsider.com/facebook-users-wait-30-days-delete-accounts-2018-10 grace period extended to a month])
 +
*[https://www.cjr.org/the_new_gatekeepers/local-publishers-facebook-political-ads.php KYC process required to post news]
 +
*[https://www.facebook.com/notes/mark-zuckerberg/building-global-community/10154544292806634/ Zuckerberg: Building a global community]
 +
*[https://caitlinjohnstone.com/2018/10/12/facebook-twitter-purge-more-dissident-media-pages-in-latest-escalation/ Facebook nuking major pages with millions of followers claiming them to be "fake news"]
 +
*[https://www.buzzfeednews.com/article/nicolenguyen/facebook-household-prediction-patent Facebook Filed A Patent To Predict Your Household's Demographics Based On Family Photos]
 +
*[https://techcrunch.com/2019/01/09/facebook-is-the-new-crapware/ Facebook is the new crapware] ''- Facebook will become an inbuilt undeletable app on most corporate hardware''
 +
*[https://www.revealnews.org/blog/a-judge-unsealed-a-trove-of-internal-facebook-documents-following-our-legal-action/ Facebook using children to steal from parents]
 +
*[https://techcrunch.com/2019/01/29/facebook-project-atlas/ Facebook pays teens to install VPN that spies on them]
 +
*[https://www.businessinsider.com/facebook-asks-new-users-email-passwords-2019-4 Facebook asking for your email password now]
 +
*[https://www.theverge.com/2019/7/3/20681231/facebook-outage-image-tags-captions-ai-machine-learning-revealed Facebook's image outage reveals how the company's AI tags your photos]
 +
*[https://www.forbes.com/sites/kalevleetaru/2019/07/26/the-encryption-debate-is-over-dead-at-the-hands-of-facebook/ The Encryption Debate Is Over - Dead At The Hands Of Facebook]
 +
[[Category:API]][[Category:Corporations]]

Revision as of 11:51, 31 July 2019

Quote.pngWhenever you log into Facebook, there are millions of posts the platform could show you. The key to its business model is the use of algorithms, driven by individual user data, to show you stuff you’re more likely to react to. Wikipedia defines an algorithm as “a set of rules that precisely defines a sequence of operations.” Algorithms appear value neutral, but the platforms’ algorithms are actually designed with a specific value in mind: maximum share of attention, which optimizes profits. They do this by sucking up and analyzing your data, using it to predict what will cause you to react most strongly, and then giving you more of that. Algorithms that maximize attention give an advantage to negative messages. People tend to react more to inputs that land low on the brainstem. Fear and anger produce a lot more engagement and sharing than joy. The result is that the algorithms favor sensational content over substance. Of course, this has always been true for media; hence the old news adage “If it bleeds, it leads.” But for mass media, this was constrained by one-size-fits-all content and by the limitations of delivery platforms. Not so for internet platforms on smartphones. They have created billions of individual channels, each of which can be pushed further into negativity and extremism without the risk of alienating other audience members. To the contrary: the platforms help people self-segregate into like-minded filter bubbles, reducing the risk of exposure to challenging ideas.
Roger McNamee from How to Fix Facebook Before It Fixes Us

Logging in to the wiki with Facebook account

In installed the facebook extension so that users can use their Facebook account to login to the wiki. This requires some database tables to be set up first by running the update.php maintenance script.

  • The Facebook SQL filenames needed to be prepending with the database table prefix before running the maintenance script.
  • I had to make all the permissions on the wiki open so that the extension could create an account.
FacebookLoggedIn.png
  • See info about the extension configuration here.
  • Sometimes during testing and deleting apps and users etc, a user becomes corrupted and can't login properly anymore. To fix this, delete everything in the Facebook database table with delete * from wiki_user_fbconnect;

Posting wiki changes to the users wall

I started with wall posts with the facebook PHP SDK, which I got working ok, except for one difference which is that the siteURL is now set from the "website" section of "Select how your app integrates with Facebook" in the "edit App" screen.

Here's the post that my test script did:

Facebook-wall-post.png

I got that working with the following settings:

$wgDefaultUserOptions['rememberpassword'] = true;
//$wgFbDisableLogin = true;
$wgFbUseRealName = true;
$wgFbEnablePushToFacebook = true;
$wgEnableArticleCommentsExt = true;
$wgFbPushEventClasses[] = 'FBPush_OnArticleComment';
include("$IP/extensions/Facebook/FacebookPushEvent.php");
include("$IP/extensions/Facebook/pushEvents/FBPush_OnArticleComment.php");

But there seems to be something wrong with the preferences and I had to comment out a condition in FacebookPushEvent.php on line 169:

if( !$wgUser->getOption( self::$PREF_TO_DISABLE_ALL ) ) {
//      if( $wgUser->getOption( $prefName ) ) {
            $pushObj->init();
//      }
    }

Further investigation shows that the problem is due to the up_properties field of the user_properties table is of type varbinary(32) so is truncated to 32 characters.

Embedding the wiki in the Facebook Canvas

I've got the wiki to embed in the canvas using the Facebook application settings shown below, but for some reason many of the links such as RecentChanges or editing a page return a blank screen while others work ok. Since October 1st the embedded application must be an HTTPS connection, but a self-signed certificate is accepted so this is not a big problem.

Facebook-app-settings.png

Mediawiki-in-facebook-canvas.jpg

See also