Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Unauthorized error for yammer call

$
0
0

Hi,

I have integrate yammer in my sharepoint site. I have custom web part which will display all posts of yammer.
 I'm getting Unauthorized error while click on log in button.

Code on my javascript file:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
    <script data-app-id="xxxxxxxxxxxx" src="https://assets.yammer.com/assets/platform_js_sdk.js"></script>
<script type="text/javascript">
    $(document).ready(function () {

        yam.config({ appId: "xxxxxxxxxxx" });

        yam.connect.loginButton('#yammer-login',
            function (response) {
                if (response.authResponse) {
                    $('#yammer-login').css('display', 'none');
                    yam.request(
                        {
                            url: "https://www.yammer.com/api/v1/messages/my_feed.json?access_token=gkwDBlShNLucsXN7mRr4Q",
                            method: "GET",
                            type: "json",
                            success: function(msg) {
                                alert("{Post was Successful!}: " + msg);
                            },
                            error: function(msg) {
                                alert("Post was Unsuccessful..." + msg);
                            }
                        }
                    );
                } else {
                    $('#txtMsg').html('you r not logged in!');
                }
            }
        ); 

I think my app was expired. How I can solve this? OR How I can update expired yammer app?


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>