Comments (7)
Hello,
Just tested these 2 function, it seems they're working fine.
What's the error you got?
from swiftyinsta.
It says EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
this is my code
self.mediaItems.forEach({ (media) in
do {
try self.handler.getMediaLikers(mediaId: media.id!, completion: { (result) in
from swiftyinsta.
Clean build your project, if you added framework manually, try to remove it from General - Linked Libraries and Frameworks
and add it again, if you added from pod, just do a clean build.
Note: make sure mediaId
is not nil
from swiftyinsta.
nope it is not nil. I tried with cleaning project and it worked.
Thanks for your help
from swiftyinsta.
@sbertix @TheM4hd1 Do you have a stand alone version of this function that you can share? The auto complete is a little daunting and gives me this.
handler.media.likers(ofMedia: <#T##String#>, with: <#T##PaginationParameters#>,
updateHandler: <#T##PaginationUpdateHandler<User, AnyPaginatedResponse>?
##PaginationUpdateHandler<User, AnyPaginatedResponse>?##(AnyPaginatedResponse, [User],
PaginationParameters, [User]) -> Void#>, completionHandler:
<#T##PaginationCompletionHandler<User>##PaginationCompletionHandler<User>##
(Result<[User], Error>, PaginationParameters) -> Void#>)
I assume the permalink goes in for the string but past that Im not sure what to do
from swiftyinsta.
The first argument is actually the mediaId
(as represented in Media.identity.identifier!
).
The with
PaginationParameters
adjusts how many pages of data to load.
updateHandler
is called every time a new page is fetched (page
is the aggregated data
, new
is the paginated array of User
s, paginationParameters
is the next PaginationParameters
, all
is a concat of all new
arrays until then).
completionHandler
is only called once at the end returns a Result<[User], Error>
result
and the following paginationParameters
.
@trentona
handler.media.likers(ofMedia: "2145341997261920748", // a random `mediaId` of a random pic on the `Instagram` account.
with: PaginationParameters(startingAt: nil, maxPagesToLoad: 1),
updateHandler: { page, new, paginationParameters, all in },
completionHandler: { result, paginationParameters in })
from swiftyinsta.
ok, cool thank you that makes sense. I only have the permalink though, how do I get the mediaId?
@sbertix
from swiftyinsta.
Related Issues (20)
- LoginWebViewController can't login HOT 5
- Get isFollowedByYou Property while fetch users own followers HOT 1
- PaginationParameters.nextMaxId always nil when querying Inbox HOT 5
- Maintainers needed
- Test HOT 1
- Test HOT 2
- how to parse response? HOT 1
- how can get account activity list in swiftyinsta ? HOT 1
- Modifying thread_message_limit when requesting the Inbox HOT 1
- handler.requests is nil HOT 4
- Pagination HOT 2
- follower count HOT 1
- pagination HOT 1
- Enum cases with associated values cannot be marked potentially unavailable with '@available' HOT 3
- fetch followers issue HOT 1
- About Download Reels Using Copy Link HOT 1
- Authorization has stopped working! HOT 3
- login completion not working HOT 1
- New maintainers or fork? HOT 2
- LoginWebViewController can't login, no return sessionid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftyinsta.