简体   繁体   中英

The type or namespace name 'FacebookSessionClient' could not be found (are you missing a using directive or an assembly reference?)

I am following http://facebooksdk.net/docs/phone/tutorial/ for logging into my Windows Phone 8 app through Facebook. Upon going through the article when I try to run the application, it gives me error-

The type or namespace name 'FacebookSessionClient' could not be found (are you missing a using directive or an assembly reference?)`

and,

The type or namespace name 'FacebookSession' could not be found (are you missing a using directive or an assembly reference?)

I am sure I have added all references and namespaces. So what I am doing wrong?

I'm not really familiar with this, but have you imported everything correctly? See also https://stackoverflow.com/a/3964462/561485

For in the top of your class:

using Facebook.Session;

I think this component has been removed from the lastest version. The way about login is replaced by

  1. "Session.ActiveSession.LoginWithBehavior("email,public_profile,user_friends", FacebookLoginBehavior.);"
  2. public enum FacebookLoginBehavior { LoginBehaviorApplicationOnly, LoginBehaviorMobileInternetExplorerOnly, LoginBehaviorWebViewOnly, }

But I still try how to login by using Facebook Beta App. If you have any ideas, I think we can discuss about this issue.

This happens because of the version of the Facebook SDK and the Facebook.Client.

Above problem can be resolved by installing the Facebook SDK version 6.3.2 and the Facebook.Client version 0.40-alpha

You can download and install using the Package Manager Console and the command can be found in here and here too .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM