dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.97k stars 1.14k forks source link

Publish titles are not showing up #874

Closed ghost closed 5 years ago

ghost commented 5 years ago

15 hours ago it was working as intended. After that captions* not working for image or video publish.

Nerixyz commented 5 years ago

There's no title property. Could you provide your code snippet? You might look int the examples.

ghost commented 5 years ago

const publishResult = await this.client.publish.photo({ file: imageBuffer, caption: post.title, });

I meant caption, sorry

ghost commented 5 years ago

ImageBuffer and post.title are not null and not empty, I already checked other possible solutions

Nerixyz commented 5 years ago

Does publishResult contain the caption? And are you sure your caption has an appropriate length?

ghost commented 5 years ago

I don't actually check the publishResult and tried with long and short captions It was working like 22 hours ago publishResult.status returns "ok" I'm gonna check publishResult now

ghost commented 5 years ago

caption from publishResult returns null this is publishResult.media image

this is the caption I send (don't mind it says title, it is object I created. It is post and I enter post.title to caption) image

Nerixyz commented 5 years ago

I don't know whats the problem there. Make sure you have the latest version installed. And just a tip: you can replace \r\n\r\n with \n (same result).

ghost commented 5 years ago

\r\n comes from os.EOL didn't put it manually. I already updated to the latest version of the API. Can you try to upload something with caption? Thanks anyways.

Nerixyz commented 5 years ago

I've tried it and it works

realinstadude commented 5 years ago

@ForGameProgrammer maybe this is really \r\n issue, cause this method should work fine. Try to caption.replace('\\r\\n', '\\n')

ghost commented 5 years ago

I've tried it with only \n and without new lines. Even this caption doesn't work. image

I'm using windows 10 and Ubuntu 18.04LTS both same These are the packages image

realinstadude commented 5 years ago

@ForGameProgrammer try to publish media with caption from another account and show us what you will recieve (ouput media object).

ghost commented 5 years ago

It actually worked... wow

{ taken_at: 1567014361, pk: '----', id: '----', device_timestamp: 1567014268987, media_type: 1, code: 'B1t28EqAaiHTwAu3lPE6GQvdNoqZif4LkrnJS00', client_cache_key: 'MjEyMDU5MjYyMjI0MTI5NDQ3MQ==.2', filter_type: 0, image_versions2: { candidates: [ [Object], [Object] ] }, original_width: 1080, original_height: 1080, user: { pk: ----, username: '----', full_name: '----', is_private: true, profile_pic_url: 'https://scontent-frt3-1.cdninstagram.com/vp/4458deb7ce1eca70a1878d21ea284f44/5DFD6817/t51.2885-19/s150x150/18380415_680297408820684_579964775602061312_a.jpg?_nc_ht=scontent-frt3-1.cdninstagram.com', profile_pic_id: '1511257922029823642_235532318', has_anonymous_profile_picture: false, can_boost_post: false, can_see_organic_insights: false, show_insights_terms: false, reel_auto_archive: 'on', is_unpublished: false, allowed_commenter_type: 'any' }, can_viewer_reshare: true, caption_is_edited: false, comment_likes_enabled: false, comment_threading_enabled: false, has_more_comments: false, max_num_visible_preview_comments: 2, preview_comments: [], can_view_more_preview_comments: false, comment_count: 0, photo_of_you: false, caption: { pk: '----', user_id: ----, text: 'Decided to make my very own Smash Summit\\n.\\n.\\n#funny #memes #meme #lol #funnymemes #comedy #dankmemes #fun #memesdaily #dank #lmao #funnyvideos #humor #laugh #jokes #hilarious #cringe #reddit #bot #humorbot', type: 1, created_at: 1567014362, created_at_utc: 1567014362, content_type: 'comment', status: 'Active', bit_flags: 0, user: { pk: 235532318, username: '----', full_name: '----', is_private: true, profile_pic_url: 'https://scontent-frt3-1.cdninstagram.com/vp/4458deb7ce1eca70a1878d21ea284f44/5DFD6817/t51.2885-19/s150x150/18380415_680297408820684_579964775602061312_a.jpg?_nc_ht=scontent-frt3-1.cdninstagram.com', profile_pic_id: '1511257922029823642_235532318', has_anonymous_profile_picture: false, can_boost_post: false, can_see_organic_insights: false, show_insights_terms: false, reel_auto_archive: 'on', is_unpublished: false, allowed_commenter_type: 'any' }, did_report_as_spam: false, share_enabled: false, media_id: '2120592622241294471' }, fb_user_tags: { in: [] }, can_viewer_save: true, organic_tracking_token: 'eyJ2ZXJzaW9uIjo1LCJwYXlsb2FkIjp7ImlzX2FuYWx5dGljc190cmFja2VkIjpmYWxzZSwidXVpZCI6IjQ2YWVkMGQzYzA0MDRmZWFhMTkyNzlkNThkZWY1ZjM4MjEyMDU5MjYyMjI0MTI5NDQ3MSIsInNlcnZlcl90b2tlbiI6IjE1NjcwMTQzNjQ1MzN8MjEyMDU5MjYyMjI0MTI5NDQ3MXwyMzU1MzIzMTh8ZDJiNWU3NDY1NGRiMzE3NmMzNDk3ODEyZDMxZThkYTI4MWUyNmUwOTVkMTg4Y2Y2Y2Q3MTUyODA2ZThhZGI5MSJ9LCJzaWduYXR1cmUiOiIifQ==' }

ghost commented 5 years ago

So after I relogged into that account it worked too... It might be issue with the states??? I deleted states and logged in to another account posted it worked, i deleted states again and relogged into first account it works now.. How did I fix : Deleted cookies (state) Thanks for help.

sergeykomlev commented 4 years ago

Guys, anyone knows how often we should update state (cookies)?

MGreif commented 3 years ago

Can you explain how exactly you deleted the cookies? Having the same issues rn and cant solve them Cheers