Error in Get-FBEvent: (OAuthException) Expected 1 '.' in the input between the postcard and the payload

Jun 12, 2011 at 7:49 AM

I run new-fbconnection and logon successfully. Get-fbconnection also returns successfully. But other get-fb* commands fail with (OAuthException) Expected 1 '.' in the input between the postcard and the payload.

For example:

PS C:\Windows\system32> Get-FBFeed
Error in Get-FBEvent: (OAuthException) Expected 1 '.' in the input between the postcard and the payload
Exception calling "Get" with "1" argument(s): "(OAuthException) Expected 1 '.' in the input between the postcard and the payload"
At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\facebook\Facebook.ps1:357 char:38
+     $result = $(Get-FBConnection).Get <<<< ($Query)
    + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : DotNetMethodException

Thoughts? Some configuration info if it helps -

PS C:\Windows\system32> Get-WmiObject Win32_OperatingSystem | fl Caption,BuildNumber,CSDVersion,OSArchitecture

Caption        : Microsoft Windows 7 Enterprise 
BuildNumber    : 7601
CSDVersion     : Service Pack 1
OSArchitecture : 64-bit

PS C:\Windows\system32> Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -recurse | Get-ItemProperty -name Version -EA 0 | Where { $_.PSChildName -match '^(?!S)\p{L}'} | Select PSChildName, Version

PSChildName                                                                                                                       Version                                                                                                                          
-----------                                                                                                                       -------                                                                                                                          
v2.0.50727                                                                                                                        2.0.50727.5420                                                                                                                   
v3.0                                                                                                                              3.0.30729.5420                                                                                                                   
Windows Communication Foundation                                                                                                  3.0.4506.5420                                                                                                                    
Windows Presentation Foundation                                                                                                   3.0.6920.5011                                                                                                                    
v3.5                                                                                                                              3.5.30729.5420                                                                                                                   
Client                                                                                                                            4.0.30319                                                                                                                        
Full                                                                                                                              4.0.30319              

PS C:\Windows\system32> $psversiontable

Name                           Value                                                                                                                                                                                                                               
----                           -----                                                                                                                                                                                                                               
CLRVersion                     2.0.50727.5444                                                                                                                                                                                                                      
BuildVersion                   6.1.7601.17514                                                                                                                                                                                                                      
PSVersion                      2.0                                                                                                                                                                                                                                 
WSManStackVersion              2.0                                                                                                                                                                                                                                 
PSCompatibleVersions           {1.0, 2.0}                                                                                                                                                                                                                          
SerializationVersion           1.1.0.1                                                                                                                                                                                                                             
PSRemotingProtocolVersion      2.1   
Coordinator
Jun 13, 2011 at 5:35 AM

Thanks clandis! I've never seen this behavior before. A few ideas:

Run
$DebugPreference = "Continue"
$VerbosePreference = "Continue"
and try Get-FBFeed again. FacebookPSModule is liberally sprinkled with debug output which could help diagnose the issue.

Run just Get-FBConnection and see what your Access Token looks like. Mine is something like "digits|digitsandletters.1-digits|digitsletters". Be careful who you send this to however, anyone with this token can access your account with all the many privileges you granted.

Clear the cached token by deleting file $env:LOCALAPPDATA\FacebookPowerShellModule_CachedToken.txt, perhaps it is corrupted. You'll need to restart PowerShell for this to take effect.

If none of these works, we can work out a time to debug via IM. I really want to clear out any issues like this before going to Beta.

Thanks,

Jon