Skip to content

Commit e92e441

Browse files
committed
2 parents f49bd87 + 0589f12 commit e92e441

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ Add the dependency
3636

3737
# Implementation
3838

39-
private val openGraphParser = OpenGraphParser(this)
39+
private val openGraphParser = OpenGraphParser(this, showNullOnEmpty = true)
4040

4141
openGraphParser.parse(linkUrl) // To parse the link provided
4242

4343
The class required you to implement two callback functions, `onError(error: String)` and `onPostResponse(openGraphResult: OpenGraphResult)`. The former is invoked in case of error (incorrect url), and the latter is invoked on successful response.
4444

45+
The `showNullOnEmpty` is an optional parameter, with a default value of `false`. If set to `true`, the parser would invoke `onError` if the `title` and `description` are empty for the link provided.
46+
4547
The data class ***OpenGraphResult*** contains:
4648

4749

0 commit comments

Comments
 (0)