Quantcast
Channel: SharePoint
Viewing all articles
Browse latest Browse all 103

How to Post on all of your FaceBook Groups Using Powershell ?

$
0
0

Powershell script saved as text here  ( Auth codes removed)

 

#1. This PowerShell script demonstrate how to use Facebook API's in PowerShell .
#2. How to load new framework dll . (Details http://sharepoint.asia/how-to-load-net-4-compiled-dll-in-powershell/ ) 
#3. How to generate Auth Access Token in facebook. (Details http://sharepoint.asia/how-to-generate-facebook-token/ )
#4. How to read online xml file which may be site map . ( $onlineXMLSitemap = "http://sharepoint.asia/sitemap.xml" ;$doc = New-Object System.Xml.XmlDocument;$doc.Load($onlineXMLSitemap);
#5. How to run c# code from powershell directly . (Add-Type -ReferencedAssemblies $mAs -TypeDefinition $cSource -Language CSharp )
#6. How to solve overload function problem in Powershell ( Post method of facebook API has two overloads , one with Path , one without path . We are using 1st . That is why we called c# code from Powershell)
#7. How to select random entries in a collection . ($doc.urlset.url | Get-Random -count 1 | ForEach-Object )
#8. Business purpose resolved : Randomly post on Facebook in my all groups . This script picks one random url from provided Sitemap.XML and post it on 100 FB Groups and your own wall . You can reduce this number though .$Groups.data  | Get-Random -count 100| ForEach-Object {
#Related terms : Bulk Post on facebook , Post on All Groups ,  Use Facebook API is Powershell , Use Facebook API is c#

 

 

Now since your powershell script is ready , its time to schedule it :

 

Search for task scheduler

Search for task Scheduler

 

Start creating a task which need no monitoring or user being logged in :

no user logged in required

 

 

Give a positive schedule

Schedule

 

Run Ps1 with powershell.exe as described in screen shot :

run powershell.exe with parameter as ps1 path

 

 

 


Viewing all articles
Browse latest Browse all 103

Trending Articles