Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Commit eca9105

Browse files
sviandeahmdrz
authored andcommitted
Media sync (#197)
* Fix: error 405 for media.sync when request with POST * Media: create setter for instagram
1 parent aa250bb commit eca9105

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

media.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,11 @@ func (media *FeedMedia) instagram() *Instagram {
677677
return media.inst
678678
}
679679

680+
// SetInstagram set instagram
681+
func (media *FeedMedia) SetInstagram(inst *Instagram) {
682+
media.inst = inst
683+
}
684+
680685
// SetID sets media ID
681686
// this value can be int64 or string
682687
func (media *FeedMedia) SetID(id interface{}) {
@@ -701,7 +706,7 @@ func (media *FeedMedia) Sync() error {
701706
&reqOptions{
702707
Endpoint: fmt.Sprintf(urlMediaInfo, id),
703708
Query: generateSignature(data),
704-
IsPost: true,
709+
IsPost: false,
705710
},
706711
)
707712
if err != nil {

0 commit comments

Comments
 (0)