Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test social media post sharing via LinkedIn for an organization page #32

Open
gutsytechster opened this issue Sep 8, 2019 · 1 comment

Comments

@gutsytechster
Copy link
Contributor

Currently, sharing social media posts through LinkedIn has been tested manually for a user profile. It could not be tested for an organization LinkedIn page due to lack of permissions to do so.
The code is written, keeping in mind, the organization page.

Hence, the piece of code needs to be tested for an organization page when LinkedIn allows us to have those permissions.

Reference to the API endpoint which is used is provided here https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api#create-ugc-posts

The post data needed to be sent with UGC(User Generated Content) API is similar to

    post_data = {
        'author': 'urn:li:organization:5590506',
        'lifecycleState': 'PUBLISHED',
        'specificContent': {
            'com.linkedin.ugc.ShareContent': {
                'shareCommentary': {
                    'text': post.text
                },
                'shareMediaCategory': 'NONE'
            },
        },
        'visibility': {
            'com.linkedin.ugc.MemberNetworkVisibility': 'PUBLIC'
        },
    }

However it is tested for author value as urn:li:person:Yk8347 i.e. for a person and not for an organization.
The line within code that corresponds to this code change is https://github.com/CuriousLearner/nexus/pull/26/files#diff-7c07be7ecf752ba7bae9810c4d28c85cR80

@gutsytechster
Copy link
Contributor Author

The line within code corresponding to the master branch is https://github.com/CuriousLearner/nexus/blob/master/nexus/social_media/services.py#L80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant