ExpandoObject работает иначе в vb.net, чем в C#

После преобразования некоторого кода здесь https://github.com/facebook-csharp-sdk/facebook-winforms-sample isnt acseptig код, такой как parameters.client_id

вот раздел, у меня проблемы с

Private Function GenerateLoginUrl(ByVal appId As String, ByVal extendedPermissions As String) As Uri
        Dim parameters As New ExpandoObject() =
        parameters.client_id = appId
        parameters.redirect_uri = "https://www.facebook.com/connect/login_success.html"

        ' The requested response: an access token (token), an authorization code (code), or both (code token).
        parameters.response_type = "token"

        ' list of additional display modes can be found at http://developers.facebook.com/docs/reference/dialogs/#display
        parameters.display = "popup"

        ' add the 'scope' parameter only if we have extendedPermissions.
        If Not String.IsNullOrWhiteSpace(extendedPermissions) Then
            parameters.scope = extendedPermissions
        End If

        ' when the Form is loaded navigate to the login url.
        Return _fb.GetLoginUrl(parameters)
    End Function

1 ответ

Попробуйте убрать знак равенства в конце строки Dim parameters As New ExpandoObject()

Другие вопросы по тегам