How do i get a long lived 60 days access token to post messages on facebook ? Getting exception error

I created just now a new app in the facebook site: https://developers.facebook.com
I have a new access token but its for short time will expire after 2 hours or so.
And i also got the app id and app secret code.
This is how im trying to use it:
private string PostFacebookWall(string accessToken, string message)
var responsePost = "";
try
//create the facebook account object
var objFacebookClient = new FacebookClient(accessToken);
var parameters = new Dictionary<string, object>();
parameters["message"] = message;
responsePost = objFacebookClient.Post("feed", parameters).ToString();
catch (Exception ex)
responsePost = "Facebook Posting Error Message: " + ex.Message;
return responsePost;
In this method PostFacebookWall its working now with the new access token i can post on my wall.
But since it will expire in few hours i want to make it longer access token for 60 days. So i have this method:
public static string RenewToken(string existingToken)
var fb = new FacebookClient();
dynamic result = fb.Get("oauth/access_token",
new
client_id = ,
client_secret = "",
grant_type = "fb_exchange_token",
fb_exchange_token = existingToken
return result.access_token;
Si called the method RenewToken in my constructor and used with my current access token code and im getting this exception:
(OAuthException - #1) The access token does not belong to application 1378943962355167
Strange since i checked double time and got the app id and secret from the current app.
This is the full exception error message:
Facebook.FacebookOAuthException was unhandled
HResult=-2146233088
Message=(OAuthException - #1) The access token does not belong to application 1378943962355167
Source=Facebook
ErrorCode=1
ErrorSubcode=0
ErrorType=OAuthException
StackTrace:
at Facebook.FacebookClient.ProcessResponse(HttpHelper httpHelper, String responseString, Type resultType, Boolean containsEtag, IList`1 batchEtags)
at Facebook.FacebookClient.Api(HttpMethod httpMethod, String path, Object parameters, Type resultType)
at Facebook.FacebookClient.Get(String path, Object parameters, Type resultType)
at Facebook.FacebookClient.Get(String path, Object parameters)
at ScrollLabelTest.Form1.RenewToken(String existingToken) in e:\scrolllabel\ScrollLabel\ScrollLabel\Form1.cs:line 290
at ScrollLabelTest.Form1..ctor() in e:\scrolllabel\ScrollLabel\ScrollLabel\Form1.cs:line 28
at ScrollLabelTest.Program.Main() in e:\scrolllabel\ScrollLabel\ScrollLabel\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

Questions related to Facebook should be posted on their forums.  These forums are for MS-related technologies.

Similar Messages

  • I am having trouble sending emails, I can receive them and access safari. The message I am getting is 'the recipient is rejected by the server' what can I do?

    I am having trouble sending emails, I can receive them and access safari. The error message I am getting is "the recipient 'persons email address' was rejected by the server. I use a company email so its not one of the selections so I set the email account up as other.

    I have deleted the accounts, reset them, reset my iphone, tried syning through iTunes still wont work

  • When using my iPhone5s, how long of a video can I upload directly to Facebook without an error?

    When using my iPhone 5s to videotape, how long can the video be to upload to Facebook successfully?

    I think you have to have the files on your HD. So either put them in iPhoto or copy them to a folder in Finder, and from there you can upload to Facebook.

  • HT4059 How do I attach a PDF file from iBooks to a private message on Facebook?

    I am trying to send an attachment PDF via private message on FB and when I press attach file on the message only my iPhoto shows up with no option to retrieve the PDF that is currently in my iBooks .

    From within the iOS mail app, the only files you have access to for attachment purposes are those located in the Photos app. The Gmail app I cannot respond to. To send a file in Dropbox, you will need to start in Dropbox and use the File function (box with an arrow).
    If this is something you need to accomplish on a regular basis, you might wish to consider an alternate email app. Mailbox can handle attachments from Dropbox (but is limited to Gmail and iCloud mail). there may well be others that will handles this.

  • I wanted to know how do you calculate the number of days between two dates

    i wanted to know how do you calculate the number of days between two dates in java ? i get both the dates from the database. i guess there are many issues like leap year and Febuary having diff no of months ..etc.

    thanks..
    I solve my problem as
    public class MyExample {
        public static void main(String a[]) {
            String stdate = "2009-03-01";
            java.sql.Date currentDate = new java.sql.Date(System.currentTimeMillis());
            java.sql.Date preDate = java.sql.Date.valueOf(stdate);
            System.out.println(currentDate);
            System.out.println(preDate);
    //        int dateCom = preDate.compareTo(currentDate);
    //        System.out.println(dateCom);
            long diff = currentDate.getTime() - preDate.getTime();
            int days = (int) Math.floor(diff / (24 * 60 * 60 * 1000));
             System.out.println(days);
    }

  • How to get the current session details in windows phone 8 when using Facebook ,Google and Microsoft login

    I want to get the session details like access token , provider etc on a page (ExamplePage.xaml.cs) , i used the following example from nokia developers community (link)
     and implemented the login part but how can i get session details  so that i can send it to my API
    The SessionService class manages the session on facebook,google,microsoft login:
    /// <summary>
    /// The service session.
    /// </summary>
    public class SessionService : ISessionService
    private readonly IApplicationSettingsService _applicationSettings;
    private readonly IFacebookService _facebookService;
    private readonly IMicrosoftService _microsoftService;
    private readonly IGoogleService _googleService;
    private readonly ILogManager _logManager;
    /// <summary>
    /// Initializes a new instance of the <see cref="SessionService" /> class.
    /// </summary>
    /// <param name="applicationSettings">The application settings.</param>
    /// <param name="facebookService">The facebook service.</param>
    /// <param name="microsoftService">The microsoft service.</param>
    /// <param name="googleService">The google service.</param>
    /// <param name="logManager">The log manager.</param>
    public SessionService(IApplicationSettingsService applicationSettings,
    IFacebookService facebookService,
    IMicrosoftService microsoftService,
    IGoogleService googleService, ILogManager logManager)
    _applicationSettings = applicationSettings;
    _facebookService = facebookService;
    _microsoftService = microsoftService;
    _googleService = googleService;
    _logManager = logManager;
    /// <summary>
    /// Gets the session.
    /// </summary>
    /// <returns>The session object.</returns>
    public Session GetSession()
    var expiryValue = DateTime.MinValue;
    string expiryTicks = LoadEncryptedSettingValue("session_expiredate");
    if (!string.IsNullOrWhiteSpace(expiryTicks))
    long expiryTicksValue;
    if (long.TryParse(expiryTicks, out expiryTicksValue))
    expiryValue = new DateTime(expiryTicksValue);
    var session = new Session
    AccessToken = LoadEncryptedSettingValue("session_token"),
    Id = LoadEncryptedSettingValue("session_id"),
    ExpireDate = expiryValue,
    Provider = LoadEncryptedSettingValue("session_provider")
    _applicationSettings.Set(Constants.LoginToken, true);
    _applicationSettings.Save();
    return session;
    /// <summary>
    /// The save session.
    /// </summary>
    /// <param name="session">
    /// The session.
    /// </param>
    private void Save(Session session)
    SaveEncryptedSettingValue("session_token", session.AccessToken);
    SaveEncryptedSettingValue("session_id", session.Id);
    SaveEncryptedSettingValue("session_expiredate", session.ExpireDate.Ticks.ToString(CultureInfo.InvariantCulture));
    SaveEncryptedSettingValue("session_provider", session.Provider);
    _applicationSettings.Set(Constants.LoginToken, true);
    _applicationSettings.Save();
    /// <summary>
    /// The clean session.
    /// </summary>
    private void CleanSession()
    _applicationSettings.Reset("session_token");
    _applicationSettings.Reset("session_id");
    _applicationSettings.Reset("session_expiredate");
    _applicationSettings.Reset("session_provider");
    _applicationSettings.Reset(Constants.LoginToken);
    _applicationSettings.Save();
    /// <summary>
    /// The login async.
    /// </summary>
    /// <param name="provider">
    /// The provider.
    /// </param>
    /// <returns>
    /// The <see cref="Task"/> object.
    /// </returns>
    public async Task<bool> LoginAsync(string provider)
    Exception exception = null;
    try
    Session session = null;
    switch (provider)
    case Constants.FacebookProvider:
    session = await _facebookService.LoginAsync();
    break;
    case Constants.MicrosoftProvider:
    session = await _microsoftService.LoginAsync();
    break;
    case Constants.GoogleProvider:
    session = await _googleService.LoginAsync();
    break;
    if (session != null)
    Save(session);
    return true;
    catch (InvalidOperationException e)
    throw;
    catch (Exception ex)
    exception = ex;
    await _logManager.LogAsync(exception);
    return false;
    /// <summary>
    /// The logout.
    /// </summary>
    public async void Logout()
    Exception exception = null;
    try
    var session = GetSession();
    switch (session.Provider)
    case Constants.FacebookProvider:
    _facebookService.Logout();
    break;
    case Constants.MicrosoftProvider:
    _microsoftService.Logout();
    break;
    case Constants.GoogleProvider:
    _googleService.Logout();
    break;
    CleanSession();
    catch (Exception ex)
    exception = ex;
    if (exception != null)
    await _logManager.LogAsync(exception);
    /// <summary>
    /// Loads an encrypted setting value for a given key.
    /// </summary>
    /// <param name="key">
    /// The key to load.
    /// </param>
    /// <returns>
    /// The value of the key.
    /// </returns>
    private string LoadEncryptedSettingValue(string key)
    string value = null;
    var protectedBytes = _applicationSettings.Get<byte[]>(key);
    if (protectedBytes != null)
    byte[] valueBytes = ProtectedData.Unprotect(protectedBytes, null);
    value = Encoding.UTF8.GetString(valueBytes, 0, valueBytes.Length);
    return value;
    /// <summary>
    /// Saves a setting value against a given key, encrypted.
    /// </summary>
    /// <param name="key">
    /// The key to save against.
    /// </param>
    /// <param name="value">
    /// The value to save against.
    /// </param>
    /// <exception cref="System.ArgumentOutOfRangeException">
    /// The key or value provided is unexpected.
    /// </exception>
    private void SaveEncryptedSettingValue(string key, string value)
    if (!string.IsNullOrWhiteSpace(key) && !string.IsNullOrWhiteSpace(value))
    byte[] valueBytes = Encoding.UTF8.GetBytes(value);
    // Encrypt the value by using the Protect() method.
    byte[] protectedBytes = ProtectedData.Protect(valueBytes, null);
    _applicationSettings.Set(key, protectedBytes);
    _applicationSettings.Save();

    I need to get the session details in the following page AllEvents.xaml.cs  :
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Navigation;
    using Microsoft.Phone.Controls;
    using Microsoft.Phone.Shell;
    using AuthenticationSample.WP80.ViewModel;
    using AuthenticationSample.WP80.Services.Model;
    using AuthenticationSample.WP80.Services;
    using AuthenticationSample.WP80.Resources;
    using System.Threading.Tasks;
    namespace AuthenticationSample.WP80.Views
    public partial class AllEvents : PhoneApplicationPage
    public AllEvents()
    InitializeComponent();
    MainViewModels FakeData = new MainViewModels();
    FakeData.LoadData();
    DataContext = FakeData;

  • Get process id and task id for long-lived process?

    Scenario:
    I have created a long-lived process that will assign a task to a user. The user then has two options to Accept or Reject. Accept route saves the data to the database. Reject does not save. 
    I want to invoke this process in .Net and need to know how to get the current task id of the process invoked. I know that invoking the async method returns an invocation id. How do I use this value to get to the current task id of the process?
    I then want to be able to call a method to complete this task outside of workspace. For example, on my form I would have an Approve and Reject button. If user clicks Approve it would choose the approve route in the process and if Reject button clicked it would take the reject route. What would be the API call to do this in .Net that would trigger the appropriate route given the button clicked on the Form?
    Any help would be appreciated.

    Generally, the TaskManager service is used to query tasks. I've not used the wsdl for that service before so I can't help you much there.
    In the process, you can get the taskID if you use a custom render service. To externalize the taskID you'd have to do something like have the render service save the ID to a file, or call a web service and pass it to the service, or use JMS service, or email service.....

  • My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    My iPhone 4 no longer connects to my car or alarm clock after a recent sync to my computer.  The message at I get when trying to. Connect is "this accessory is not optimized for the device" or something like that.  Anyone know how to fix this?

    Hello there philp_69,
    If I understand correctly it sounds like your phone hasnt been recognized in iTunes on your PC since the last couple of updates. I would use the troubleshooting in the following article which will walk you through the steps one by one. 
    iPhone, iPad, or iPod touch not recognized in iTunes for Windows
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • How to get total number of days

    Hi All,
    how to get total number of days , for example if month eq 05 then need to get total number of days until MAY 31.
    and how to get total number of days in a month.
    Thank You,,
    Sriii..

    Hi Sridhar,
    Pls Try to search before posting general questions.
    Try this,
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis                   = p_lv_date1
          i_datum_von                   = p_lv_date2
       IMPORTING
         e_tage                        = p_e_date_difference
       EXCEPTIONS
         days_method_not_defined       = 1
         OTHERS                        = 2
      IF sy-subrc  0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
             WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Regards,
    Sunil kairam.

  • How to get the number of days in a month?

    hi all
    is there any way to get the number of days in a given month with a given year? for instance, if year is 2004 and the month is July or February, how can i get the number of days? thanks.

    Gee, I don't know ... Maybe this:
    Calendar cal = Calendar.newInstance();
    cal.set(Calendar.YEAR, 2004);
    cal.set(Calendar.MONTH, Calendar.FEBUARY);
    System.out.println("max days in month: " + cal.getActualMaximum(Calendar.DAY_OF_MONTH));
    Do you not bother reading what people have already posted? Read the API docs on the Calendar class.

  • How to get the number of days of February.....

    Hi ,
    how can I get the number of days (28 or 29) of February of the current year or the next...????
    Or is there any other way to find that a year is a leap or not (i mean the year has 365 or 366 days).??
    Thanks
    Simon

    select add_months(to_date('&v_year', 'YYYY'), 12) -
    to_date('&v_year', 'YYYY') from dual;Jens, it seems we have made the same mistake, trunc usage seems mandatory :
    SQL> ed
    Wrote file afiedt.buf
      1* select add_months(to_date('2007', 'YYYY'), 12) - to_date('2007', 'YYYY') from dual
    SQL> /
    ADD_MONTHS(TO_DATE('2007','YYYY'),12)-TO_DATE('2007','YYYY')
                                                             366
    SQL> ed
    Wrote file afiedt.buf
      1* select add_months(trunc(to_date('2007', 'YYYY'), 'YYYY'), 12) - trunc(to_date('2007', 'YYYY'), 'YYYY') from dual
    SQL> /
    ADD_MONTHS(TRUNC(TO_DATE('2007','YYYY'),'YYYY'),12)-TRUNC(TO_DATE('2007','YYYY')
                                                                                 365
    SQL> Just to clarify my past doubt.
    Nicolas.

  • Out of nowhere my daughter, who uses a Samsung Galaxy Victory phone is no longer receiving my text messages but I get hers.  How can I fix this.  I have a 4S and have updated to the 1SO7.

    Out of nowhere my daughter, who uses a Samsung Galaxy Victory phone is no longer receiving my text messages but I get hers.  How can I fix this.  I have a 4S and have updated to the ios 7.0.4.

    http://support.apple.com/kb/ts2755
    if the link provided doesn't help, then you will need to contact your phone carrier as SMS is a carrier feature.

  • I don't know what I did, but Aperture no longer sees my HD as online, and I can't get my photo versions since the HD is not online. I see it in Finder, but Aperture no longer recognizes it. Does someone know how to fix this?

    I don't know what I did, but Aperture no longer sees my HD as online, and I can't get my photo versions since the HD is not online. I see it in Finder and can see the original files and even copy them from Finder, but Aperture no longer recognizes the HD, and when I try to work with the picture, it doesn't let me because it says that the master is in a volume that's offline. Does someone know how to fix this?

    Just to clarify:
    Does Aperture not see the drive at all (that is, does Aperture also not see the drive in the import and export dialogue) or are only the Master Files disconnected?
    If Aperture does not recognize the drive at all, check the permission settings of the drive in the "Get Info" panel and make sure you have read/write access, also the "Ignore ownership on this volumn" checkmark, this should be set.
    If correcting the permissions does not help, make sure you have a backup, and then use "Disk Utility" to run a check and to repair the volumn, if necessary.
    If Aperture can see the drive on import and export, but only does not see the master image files, then try to reconnect your masters.
    Create a smart album or use a Search with the rule: "File status: offline", to select all images that need reconnecting to their masters.
    Right click on the first image of the selection.
    From the Pop-up window select "Locate referenced Files..."
    Now the "Reconnect All" button should appear.
    Click it.

  • How to get the long file name from an 8.3 name in Windows.

    Because of a legacy string limitation, I have a list of files in 8.3 format. The actual files are saved with long names. How can I get the long name from the short name?
    In JavaScript, I would get a file system object and get the file object from there with the short name. Then it's no problem to get the full name. But I don't see anything in Java that matches that. ???
    Ideas?
    Frank Perry, MSEE

    Here is what I did.
    String displayName = "somefi~1.txt";
    File fO = new File("c:\\"); // I have a more involved path but that's not important here.
    String stPath = fO.getPath() + displayName;
    File fD = new File(stPath); // get the file using the short name.
    File fDc = new File(fD.getCanonicalPath()); // get another file using the cononical name
    String FulldisplayName = fDc.getName(); // get the long name from there.
    It's roundabout but it works. Since getName() on the file read with the short name only returns the name used to get the file, I open it twice. The alternative is to parse the cononical name for the file name but that's clumbsy too.
    Frank

  • I'm getting kernel panics each day as I shut down, the message of restarting by holding down the power button appears on the screen - it began about a month ago and. Do you have any ideas of how to solve the problem?

    I'm getting kernel panics each day as I shut down, the message of restarting by holding down the power button appears on the screen - it began about a month ago and. Do you have any ideas of how to solve the problem? I've copied the logs that I found for each kernel panic that still have the message logged. Please help if you can, I have read some of the other comments and perhaps it has something to do with my anti-virus software being on at start up. I have copied the log here. Any advice will be welcome.
    Interval Since Last Panic Report:  665204 sec
    Panics Since Last Report:          8
    Anonymous UUID: D6DCC90D-A5CA-4BBE-A435-3E64A512A51B
    Sat May 26 07:23:05 2012
    panic(cpu 3 caller 0xffffff80002b4f36): trying to interlock destroyed mutex (0xffffff801a489be0)
    Backtrace (CPU 3), Frame : Return Address
    0xffffff8160313b00 : 0xffffff8000220792
    0xffffff8160313b80 : 0xffffff80002b4f36
    0xffffff8160313b90 : 0xffffff8000227e68
    0xffffff8160313bd0 : 0xffffff7f80d14250
    0xffffff8160313c20 : 0xffffff7f80d14f73
    0xffffff8160313cc0 : 0xffffff800059a237
    0xffffff8160313d00 : 0xffffff8000586cbf
    0xffffff8160313d20 : 0xffffff800057e6e3
    0xffffff8160313df0 : 0xffffff800057ed06
    0xffffff8160313e20 : 0xffffff8000583c52
    0xffffff8160313e70 : 0xffffff8000583d05
    0xffffff8160313e90 : 0xffffff80005358b4
    0xffffff8160313ef0 : 0xffffff80005367c3
    0xffffff8160313f30 : 0xffffff8000536897
    0xffffff8160313f60 : 0xffffff80005ccfe8
    0xffffff8160313fb0 : 0xffffff80002da5e9
          Kernel Extensions in backtrace:
    com.intego.iokit.VBX6NKE(1.0)[211D5E46-3E43-C5DC-9C6A-8C3FFF0F4493]@0xffffff7f8 0d11000->0xffffff7f80d1bfff
    dependency: com.apple.iokit.IONetworkingFamily(2.1)[2FCC16E1-34AB-3908-98BD-CCBFA56FFDCE]@0 xffffff7f809b7000
    BSD process name corresponding to current thread: iStatLocalDaemon
    Mac OS version:
    11E53
    Kernel version:
    Darwin Kernel Version 11.4.0: Mon Apr  9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64
    Kernel UUID: A8ED611D-FB0F-3729-8392-E7A32C5E7D74
    System model name: iMac11,2 (Mac-F2238AC8)
    System uptime in nanoseconds: 69777074610
    last loaded kext at 58265763561: com.intego.iokit.VBX6NKE            1 (addr 0xffffff7f80d11000, size 45056)
    loaded kexts:
    com.intego.iokit.VBX6NKE            1
    com.intego.iokit.BehavioralKext            1
    com.intego.kext.VirusBarrier.AppBarrierKPI            10.6.8
    com.intego.kext.VirusBarrierKPI            10.6.8
    com.globaldelight.driver.BoomDevice            1.1
    com.huawei.driver.HuaweiDataCardACMData            4.2
    Model: iMac11,2, BootROM IM112.0057.B01, 2 processors, Intel Core i3, 3.2 GHz, 12 GB, SMC 1.64f5
    Graphics: ATI Radeon HD 5670, ATI Radeon HD 5670, PCIe, 512 MB
    Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x802C, 0x31364A53463531323634485A2D3147344431
    Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x802C, 0x31364A53463531323634485A2D3147344431
    Memory Module: BANK 0/DIMM1, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353637334648302D4348392020
    Memory Module: BANK 1/DIMM1, 2 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353637334648302D4348392020
    AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x8F), Atheros 9280: 4.0.64.8-P2P
    Bluetooth: Version 4.0.5f11, 2 service, 18 devices, 1 incoming serial ports
    Serial ATA Device: ST31000528AS, 1 TB
    Serial ATA Device: OPTIARC DVD RW AD-5680H
    USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
    USB Device: USB2.0 Hub, 0x05e3  (Genesys Logic, Inc.), 0x0606, 0xfa140000 / 5
    USB Device: USB2.0 Hub, 0x05e3  (Genesys Logic, Inc.), 0x0606, 0xfa141000 / 9
    USB Device: Apple Optical USB Mouse, apple_vendor_id, 0x0304, 0xfa141100 / 8
    USB Device: CanoScan, 0x04a9  (Canon Inc.), 0x1904, 0xfa141200 / 6
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
    USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 7
    USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfa120000 / 3
    USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
    USB Device: HUAWEI Mobile, 0x12d1  (Huawei Technologies Co., Ltd.), 0x1001, 0xfd130000 / 5
    USB Device: My Passport 070A, 0x1058  (Western Digital Technologies, Inc.), 0x070a, 0xfd140000 / 6
    USB Device: Built-in iSight, apple_vendor_id, 0x8502, 0xfd110000 / 4
    USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 3

    Immediate suspects are the additions you added to you rsystem that installed kexts (drivers).  From above,
    com.intego.iokit.VBX6NKE            1
    com.intego.iokit.BehavioralKext            1
    com.intego.kext.VirusBarrier.AppBarrierKPI            10.6.8
    com.intego.kext.VirusBarrierKPI            10.6.8
    com.globaldelight.driver.BoomDevice            1.1
    com.huawei.driver.HuaweiDataCardACMData            4.2
    Two experiments you can try.
    1.  Boot in safe mode and see if you can shut down normally.  All thise additions won't be running in safe mode so this test would indicate it is one of them causing the problem.
    2. Uninstall all the intego VirusBarrier stuff.  That's my first guess and the troublemaker.

Maybe you are looking for